Open RyanEruditional opened 2 months ago
I have found a work around.
Deploy Winget via System behaviour with dependencies: Add-AppxProvisionedPackage -Online -PackagePath $WingetDownloadPath -DependencyPackagePath $VClibs64DownloadPath,$XmalPath -SkipLicense
Then deploy Winget via User behaviour with dependencies: Add-AppxPackage -Path $WingetDownloadPath -DependencyPath $VClibs64DownloadPath,$XmalPath
(Install script is a bit more complicated then the above but it sums up the overall point)
System Intune installation of Winget cannot access the User folders therefore winget.exe in AppData does not get created. User Intune installation of Winget cannot access WindowsApps therefore Winget.exe does not get created here.
Deploy Winget both via System and User ensures that both files are created.
Brief description of your issue
I am using Winget within Intune to deploy System and User Behaviour applications.
In previous versions of Winget, a reference is placed within: \AppData\Local\Microsoft\WindowsApps
\AppData\Local\Microsoft\WindowsApps\Winget.exe \AppData\Local\Microsoft\WindowsApps\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
With the most recent version of Winget, these folders do not get created successfully after installation.
Below is the result of my Transcript log when deploying Winget (App Installer) through Intune. As you can see, this has installed successfully.
I am able to successfully resolve Winget's path when deploying applications as system. System applications are installed without problems. SYSTEM PATH: C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.22.10861.0_x64__8wekyb3d8bbwe\winget.exe
USER Behaviour applications deployed via Intune cannot access the above System Path. As mentioned previously, these applications rely on the below:
\AppData\Local\Microsoft\WindowsApps\Winget.exe \AppData\Local\Microsoft\WindowsApps\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
Without this path, I am unable to install USER Behaviour applications.
If I amend permissions for C:\Program Files\WindowsApps\ and give myself access. I can run winget.exe within: C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.22.10861.0_x64__8wekyb3d8bbwe\winget.exe
This then generates the necessary folders within AppData for the user.
However in context of Microsoft Autopilot/Intune, deploying a script via system to run winget.exe within Windows Apps will only create the appdata folders within the appdata of System itself and not for other users.
Users cannot access this location and I cannot risk giving users access to these folder location. It is naturally prohibited to access by default within Windows.
Has anyone come across this before? This wasn't a issue in previous versions of Winget. Anyone know of any valid work arounds?
Many thanks.
Steps to reproduce
Install Winget via:
Add-AppxProvisionedPackage -Online -PackagePath $WingetDownloadPath -DependencyPackagePath $VClibs64DownloadPath,$XmalPath -SkipLicense
Expected behavior
Winget to install itself within AppData
Actual behavior
Winget only installs itself within: C:\Program Files\WindowsApps\
It does not appear within AppData
Environment