jmanuelng / MEM_UpdateChrome

Upgrade Google Chrome using Microsoft Intune's "Remediations". It leverages Winget.exe and GoogleUpdate.exe to ensure Google Chrome is up-to-date ASAP.
3 stars 3 forks source link

Pre-remediation detection error #1

Open A-J-A opened 1 year ago

A-J-A commented 1 year ago

Hi, Thank you for sharing the script. Have you ever seen this error before?

Find-WingetPath : Winget wasn't located in any of the specified locations. At C:\Windows\IMECache\HealthScripts\f319f6df-e99f-4e95-aa48-6b04a307044c_2\detect.ps1:286 char:19 + $wingetPath = Find-WingetPath + ~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Find-WingetPath Get-WingetLatestChromeVersion : Cannot bind argument to parameter 'WingetFilePath' because it is an empty string. At C:\Windows\IMECache\HealthScripts\f319f6df-e99f-4e95-aa48-6b04a307044c_2\detect.ps1:303 char:68 + ... etVersion = Get-WingetLatestChromeVersion -WingetFilePath $wingetPath + ~~~ + CategoryInfo : InvalidData: (:) [Get-WingetLatestChromeVersion], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Get-WingetLatestChromeVersion

jmanuelng commented 1 year ago

Hola!

Was this on a W10 system? By now I've come across couple of environments where remediation script has failed.

I have made updates to the function in our MEM_AppWin32_WingetApp repository, updated function is on both, the detect and install scripts. Specifically to the Install_WingetApp.ps1 script there is also code to, in case Winget not found, the script installs Winget and dependencies.

The idea for that script is to be used to install any Winget application, of course, extensive testing is recommended to ensure compatibility and functionality.

This week I'll come back to update this reposiory and all Winget related repositories. I'll also work on a "generic" update script for Winget apps. I've been having a difficult time making things work using SYSTEM context and detecting the apps exclusively using "Winget list".