mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 06:35:51 -06:00
Move winget install to user temp folder (#192)
* Move winget install to user temp folder * Fix path variable Co-authored-by: Chris Titus <dfm.titus@gmail.com>
This commit is contained in:
parent
3ced5c3ea9
commit
ed696ba724
18
winutil.ps1
18
winutil.ps1
@ -440,15 +440,15 @@ $WPFinstall.Add_Click({
|
||||
Write-Host "Running Alternative Installer for LTSC/Server Editions"
|
||||
|
||||
#Download Needed Files
|
||||
Write-Host "Downloading Needed Files..."
|
||||
Start-BitsTransfer -Source "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx" -Destination "./Microsoft.VCLibs.x64.14.00.Desktop.appx"
|
||||
Start-BitsTransfer -Source "https://github.com/microsoft/winget-cli/releases/download/v1.2.10271/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -Destination "./Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
|
||||
Start-BitsTransfer -Source "https://github.com/microsoft/winget-cli/releases/download/v1.2.10271/b0a0692da1034339b76dce1c298a1e42_License1.xml" -Destination "./b0a0692da1034339b76dce1c298a1e42_License1.xml"
|
||||
Write-Host "Downloading Needed Files..."
|
||||
Start-BitsTransfer -Source "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx" -Destination "$env:TEMP\Microsoft.VCLibs.x64.14.00.Desktop.appx"
|
||||
Start-BitsTransfer -Source "https://github.com/microsoft/winget-cli/releases/download/v1.2.10271/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -Destination "$env:TEMP\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
|
||||
Start-BitsTransfer -Source "https://github.com/microsoft/winget-cli/releases/download/v1.2.10271/b0a0692da1034339b76dce1c298a1e42_License1.xml" -Destination "$env:TEMP\b0a0692da1034339b76dce1c298a1e42_License1.xml"
|
||||
|
||||
#Installing Packages
|
||||
Write-Host "Installing Packages..."
|
||||
Add-AppxProvisionedPackage -Online -PackagePath ".\Microsoft.VCLibs.x64.14.00.Desktop.appx" -SkipLicense
|
||||
Add-AppxProvisionedPackage -Online -PackagePath ".\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -LicensePath ".\b0a0692da1034339b76dce1c298a1e42_License1.xml"
|
||||
Add-AppxProvisionedPackage -Online -PackagePath "$env:TEMP\Microsoft.VCLibs.x64.14.00.Desktop.appx" -SkipLicense
|
||||
Add-AppxProvisionedPackage -Online -PackagePath "$env:TEMP\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -LicensePath "$env:TEMP\b0a0692da1034339b76dce1c298a1e42_License1.xml"
|
||||
Write-Host "winget Installed (Reboot might be required before winget will work)"
|
||||
|
||||
#Sleep for 5 seconds to maximize chance that winget will work without reboot
|
||||
@ -457,9 +457,9 @@ $WPFinstall.Add_Click({
|
||||
|
||||
#Removing no longer needed Files
|
||||
Write-Host "Removing no longer needed Files..."
|
||||
Remove-Item -Path ".\Microsoft.VCLibs.x64.14.00.Desktop.appx" -Force
|
||||
Remove-Item -Path ".\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -Force
|
||||
Remove-Item -Path ".\b0a0692da1034339b76dce1c298a1e42_License1.xml" -Force
|
||||
Remove-Item -Path "$env:TEMP\Microsoft.VCLibs.x64.14.00.Desktop.appx" -Force
|
||||
Remove-Item -Path "$env:TEMP\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -Force
|
||||
Remove-Item -Path "$env:TEMP\b0a0692da1034339b76dce1c298a1e42_License1.xml" -Force
|
||||
Write-Host "Removed Files that are no longer needed"
|
||||
}
|
||||
elseif (((Get-ComputerInfo).WindowsVersion) -lt "1809") {
|
||||
|
Loading…
Reference in New Issue
Block a user