Skip to content

Commit

Permalink
fix: don't hardcode C:
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Sep 18, 2023
1 parent 210ecef commit cb6e6bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/playbook/Executables/LIBREWOLF.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ $librewolfUpdaterDownload = (Invoke-RestMethod -Uri "$librewolfUpdaterURI" -Head
Select-Object -ExpandProperty browser_download_url

# output paths
$outputLibrewolf = "C:\$librewolfFileName"
$outputLibrewolfUpdater = "C:\librewolf-winupdater.zip"
$outputLibrewolf = "$env:SystemDrive\$librewolfFileName"
$outputLibrewolfUpdater = "$env:SystemDrive\librewolf-winupdater.zip"

Write-Warning "Downloading the latest LibreWolf setup"
Invoke-WebRequest -Uri $librewolfDownload -OutFile $outputLibrewolf
Expand Down
2 changes: 1 addition & 1 deletion src/playbook/Executables/THEME.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ for /f "tokens=6 delims=[.] " %%a in ('ver') do (if %%a GEQ 22000 set win11=true
for /f "usebackq tokens=2 delims=\" %%a in (`reg query "HKEY_USERS" ^| findstr /r /x /c:"HKEY_USERS\\S-.*" /c:"HKEY_USERS\\AME_UserHive_[^_]*"`) do (
reg query "HKEY_USERS\%%a" | findstr /c:"Volatile Environment" /c:"AME_UserHive_" > nul && (
if "%%a" == "AME_UserHive_Default" (
call :ALLUSERS "%%a" "C:\Users\Default\AppData\Roaming"
call :ALLUSERS "%%a" "%SystemRoot%\Users\Default\AppData\Roaming"
) else (
for /f "usebackq tokens=2* delims= " %%b in (`reg query "HKU\%%a\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "AppData" ^| findstr /r /x /c:".*AppData[ ]*REG_SZ[ ].*"`) do (
call :ALLUSERS "%%a" "%%c"
Expand Down

0 comments on commit cb6e6bf

Please sign in to comment.