-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# PowerShell script that downloads latest release from GitHub and installs it to PowerToys Run plugin folder | ||
# Usage: .\installer.ps1 | ||
|
||
$installLocation = "C:\Program Files\PowerToys\modules\launcher\Plugins\Winget" | ||
|
||
# Get latest release from GitHub | ||
$latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/bostrot/PowerToysRunPluginWinget/releases/latest" | ||
|
||
# Get download URL for latest release | ||
$downloadUrl = $latestRelease.assets.browser_download_url | ||
|
||
# Download latest release | ||
Invoke-WebRequest -Uri $downloadUrl -OutFile "Winget.tmp.zip" | ||
|
||
# Unzip latest release | ||
Expand-Archive -Path "Winget.tmp.zip" -DestinationPath "$installLocation.tmp" | ||
|
||
# Move files to plugin folder | ||
Move-Item "$installLocation.tmp\Winget" $installLocation | ||
|
||
# Remove zip file | ||
Remove-Item "Winget.tmp.zip" | ||
|
||
# Remove temporary folder | ||
Remove-Item "$installLocation.tmp" -Recurse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Create installer with 7zip SFX | ||
|
||
|
||
# 7zip command to create sfx archive and specify extract location | ||
$cmd = "7z a -sfx7z.sfx -oC:\Users\Public\Documents\ | ||