Skip to content

Commit

Permalink
Added installer
Browse files Browse the repository at this point in the history
  • Loading branch information
bostrot committed Jun 9, 2023
1 parent b6b3d90 commit 86132a4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
25 changes: 25 additions & 0 deletions installer.ps1
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
6 changes: 6 additions & 0 deletions installer_creator.ps1
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\

0 comments on commit 86132a4

Please sign in to comment.