$null = New-ItemProperty -Path $_PowershellKey. $_PowershellKey = New-Item Registry:: $SandboxRegKey\SOFTWARE\Microsoft\PowerShell\ 1\ShellIds\Microsoft.PowerShell -Force $_PowershellKey = Get-Item Registry:: $SandboxRegKey\SOFTWARE\Microsoft\PowerShell\ 1\ShellIds\Microsoft.PowerShell -ErrorAction 'Silentl圜ontinue ' Write-Output 'Writing registry key to enable powershell script execution ' PSPath -Name 'InstallWingetAndDependencies ' -Value 'powershell.exe "Add-AppxPackage C:\Windows\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -DependencyPath "C:\Windows\Microsoft.UI.Xaml.2.7.appx","C:\Windows\Microsoft.VCLibs.圆4.14.00.Desktop.appx"" ' -PropertyType 'String ' -Force $_RunKey = New-Item Registry:: $SandboxRegKey\SOFTWARE\Microsoft\Windows\CurrentVersion\Run -Force $_RunKey = Get-Item Registry:: $SandboxRegKey\SOFTWARE\Microsoft\Windows\CurrentVersion\Run -ErrorAction 'Silentl圜ontinue ' Write-Output 'Writing registry key to install Winget ' $_UILibsAppxPath = Join-Path -Path $ env:TEMP -ChildPath 'Microsoft.UI.Xaml.2.7\tools\AppX\圆4\Release\Microsoft.UI.Xaml.2.7.appx 'Ĭopy-Item -Path $_UILibsAppxPath -Destination $( Join-Path -Path $_WindowsPath -ChildPath 'Microsoft.UI.Xaml.2.7.appx ') Write-Output 'Extracting Microsoft UI Appx to Sandbox 'Įxpand-Archive -Path $_UILibsZipPath -DestinationPath $( Join-Path -Path $ env:TEMP -ChildPath 'Microsoft.UI.Xaml.2.7 ') -Force $_UILibsZipPath = Join-Path -Path $ env:TEMP -ChildPath 'Microsoft.UI.Xaml.2.7.zip ' Write-Output 'Fetching Microsoft UI Nuget Package ' DownloadFile( ' ', $( Join-Path -Path $_WindowsPath -ChildPath 'Microsoft.VCLibs.圆4.14.00.Desktop.appx ')) Write-Output 'Downloading VCLibs to Sandbox ' DownloadFile( $_LatestUrl, $( Join-Path -Path $_WindowsPath -ChildPath 'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle ')) Write-Output 'Downloading Winget to Sandbox ' If ( !( Get-Command 'WindowsSandbox.exe ' -ErrorAction 'Silentl圜ontinue ')) ).browser_download_url
0 Comments
Leave a Reply. |