Skip to content

Commit 86132a4

Browse files
committed
Added installer
1 parent b6b3d90 commit 86132a4

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

installer.ps1

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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

installer_creator.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
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+

0 commit comments

Comments
 (0)