File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ # PowerShell script that downloads latest release from GitHub and installs it to PowerToys Run plugin folder
2+ # Usage: .\installer.ps1
3+
4+ $installLocation = " C:\Program Files\PowerToys\modules\launcher\Plugins\Winget"
5+
6+ # Get latest release from GitHub
7+ $latestRelease = Invoke-RestMethod - Uri " https://api.github.com/repos/bostrot/PowerToysRunPluginWinget/releases/latest"
8+
9+ # Get download URL for latest release
10+ $downloadUrl = $latestRelease.assets.browser_download_url
11+
12+ # Download latest release
13+ Invoke-WebRequest - Uri $downloadUrl - OutFile " Winget.tmp.zip"
14+
15+ # Unzip latest release
16+ Expand-Archive - Path " Winget.tmp.zip" - DestinationPath " $installLocation .tmp"
17+
18+ # Move files to plugin folder
19+ Move-Item " $installLocation .tmp\Winget" $installLocation
20+
21+ # Remove zip file
22+ Remove-Item " Winget.tmp.zip"
23+
24+ # Remove temporary folder
25+ Remove-Item " $installLocation .tmp" - Recurse
Original file line number Diff line number Diff line change 1+ # Create installer with 7zip SFX
2+
3+
4+ # 7zip command to create sfx archive and specify extract location
5+ $cmd = " 7z a -sfx7z.sfx -oC:\Users\Public\Documents\
6+
You can’t perform that action at this time.
0 commit comments