-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install Winget app using script #8
Comments
Hi Kasper, See the log file is empty at Usually should look like this Could you try manually opening CMD as system account (psexec) on the target machine. Let me know what the output is. Curiously awaiting your response. |
OK, so I tested the same thing in a Windows 10 machine same issue. I have also tested on an Windows 11 machine, that is not enrolled in my Intune tenant, it's a basic workgroup joined Windows 11, same issue. |
Have you seen this: |
That is strange. This is not the behaviour i see when executing winget.exe under system account.
Interesting. Making it easier to run under SYSTEM and Microsoft recognizing its support for such operations simplifies things. |
Yes I have seen that, it doesn't work either. I have extended my tests to a vanilla Windows 11 23H2, no domain join, no Intune join only workgroup.Same thing. I use PSexec to test winget in system context. I have found an older post here as well, which mentions issues with running winget in system context: |
microsoft/winget-cli#962. Could you try running this below script?
Here is my result executing the above on Windows 11 23H2 (22631.3007):
|
Your suggestion seems to work. Compared to what I have tested earlier, the Set-Location is new. Is that already a part of your winget wrapper script? |
Hi Kasper,
|
Could you try to run it from ISE directly without saving to script file first ? |
Hi, I have the exact same issue, was a resolution found for this? |
Hi Jazzy I have not yet found a solution. It's a problem with winget itself, not this script from Soren. Even the Winget Powershell module has the issue. It's really too bad, because I really like Sorens approach with this, but as long as winget doesn't work in SYSTEM context, it's not a viable solution with Intune. |
From my experience Winget packages makes issues when you assign them to devices in Intune. Make sure to assign even the apps with System context only to users and not the devices. Then at least for me it always works. |
I am having som trouble installing Winget apps using your script. To simplify the process I am using the WinGet-WrapperImportFromCSV.ps1 script with the WinGet-WrapperImportFromCSV.csv file, which contains. I have made a minor change though, I have configured the UpdateOnly property to 0, as I want the VLC app installed, and not just updated.
The intinewin file is built and imported to my Intune tenant with no issues whatsoever.
On my test machine I can see the Intune pushing the app to the machine, but the app setup fails. Below are the contents of the log files generated on the machine:
VideoLAN.VLC_WinGet_Detection_2023-11-22_09-40-17:
[2023-11-22 09:40:17] WinGet-WrapperDetection v.3.5
[2023-11-22 09:40:17] https://github.com/SorenLundt/WinGet-Wrapper
[2023-11-22 09:40:17] **************************************************
[2023-11-22 09:40:17] Host: WLS-6611
[2023-11-22 09:40:17] PackageName: VideoLAN.VLC
[2023-11-22 09:40:17] TargetVersion:
[2023-11-22 09:40:17] AcceptNewerVersion = True
[2023-11-22 09:40:17] LogPath: C:\ProgramData\WinGet-WrapperLogs
[2023-11-22 09:40:17] **************************************************
[2023-11-22 09:40:17] Running in System Context
[2023-11-22 09:40:17] WinGet path: C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.21.3133.0_x64__8wekyb3d8bbwe\winget.exe
[2023-11-22 09:40:18] WinGet version:
[2023-11-22 09:40:19] Failed to get installed version: Cannot index into a null array.
[2023-11-22 09:40:19] exit 1 - Report Not Installed
VideoLAN.VLC_WinGet_Wrapper_2023-11-22_09-40-21
[2023-11-22 09:40:21] WinGet-Wrapper v.1.9
[2023-11-22 09:40:21] https://github.com/SorenLundt/WinGet-Wrapper
[2023-11-22 09:40:21] **************************************************
[2023-11-22 09:40:21] Host: WLS-6611
[2023-11-22 09:40:21] PackageName: VideoLAN.VLC
[2023-11-22 09:40:21] StopProcess:
[2023-11-22 09:40:21] PreScript:
[2023-11-22 09:40:21] PostScript:
[2023-11-22 09:40:21] ArgumentList: install --exact --id VideoLAN.VLC --silent --accept-package-agreements --accept-source-agreements --scope Machine
[2023-11-22 09:40:21] LogPath: C:\ProgramData\WinGet-WrapperLogs
[2023-11-22 09:40:21] **************************************************
[2023-11-22 09:40:21] Running in System Context
[2023-11-22 09:40:21] WinGet path: C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.21.3133.0_x64__8wekyb3d8bbwe\winget.exe
[2023-11-22 09:40:21] Executing C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.21.3133.0_x64__8wekyb3d8bbwe\winget.exe install --exact --id VideoLAN.VLC --silent --accept-package-agreements --accept-source-agreements --scope Machine
[2023-11-22 09:40:21] Script Finished
VideoLAN.VLC_WinGet_Detection_2023-11-22_09-40-37
[2023-11-22 09:40:37] WinGet-WrapperDetection v.3.5
[2023-11-22 09:40:37] https://github.com/SorenLundt/WinGet-Wrapper
[2023-11-22 09:40:37] **************************************************
[2023-11-22 09:40:37] Host: WLS-6611
[2023-11-22 09:40:37] PackageName: VideoLAN.VLC
[2023-11-22 09:40:37] TargetVersion:
[2023-11-22 09:40:37] AcceptNewerVersion = True
[2023-11-22 09:40:37] LogPath: C:\ProgramData\WinGet-WrapperLogs
[2023-11-22 09:40:37] **************************************************
[2023-11-22 09:40:37] Running in System Context
[2023-11-22 09:40:37] WinGet path: C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.21.3133.0_x64__8wekyb3d8bbwe\winget.exe
[2023-11-22 09:40:38] WinGet version:
[2023-11-22 09:40:39] Failed to get installed version: Cannot index into a null array.
[2023-11-22 09:40:39] exit 1 - Report Not Installed
I am currently running tests on W11 23H2, but I have the same issue on a W10 22H2 machine.
Do you have any suggestions to what's going on?
The text was updated successfully, but these errors were encountered: