Skip to content

Commit

Permalink
Error checking for WinGet
Browse files Browse the repository at this point in the history
  • Loading branch information
JustOptimize committed Sep 11, 2023
1 parent 9ab3e11 commit 32c4a1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ echo]

:: Download and install Open-Shell
winget install -e --id Open-Shell.Open-Shell-Menu -h --accept-source-agreements --accept-package-agreements --force
if !errorlevel! NEQ 0 (
echo Error: Open-Shell installation failed.
pause
exit /b 1
)

:: Download Fluent Metro theme
for /f "delims=" %%a in ('PowerShell "(Invoke-RestMethod -Uri "https://api.github.com/repos/bonzibudd/Fluent-Metro/releases/latest").assets.browser_download_url"') do (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ where winget > nul 2>&1 || (

echo Installing Process Explorer...
winget install -e --id Microsoft.Sysinternals.ProcessExplorer --uninstall-previous -l "%windir%\AtlasModules\Apps\ProcessExplorer" -h --accept-source-agreements --accept-package-agreements --force --disable-interactivity > nul
if !errorlevel! NEQ 0 (
echo Error: Process Explorer installation failed.
pause
exit /b 1
)

echo Creating the Start menu shortcut...
PowerShell -NoP -C "$WshShell = New-Object -comObject WScript.Shell; $Shortcut = $WshShell.CreateShortcut("""$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Process Explorer.lnk"""); $Shortcut.TargetPath = """$env:WinDir\AtlasModules\Apps\ProcessExplorer\procexp.exe"""; $Shortcut.Save()" > nul
Expand Down

0 comments on commit 32c4a1f

Please sign in to comment.