use !local! macro

This commit is contained in:
Mylloon 2023-11-05 14:51:37 +01:00
parent f965b323ae
commit 8cab9ae9e4
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -2,15 +2,16 @@
SETLOCAL ENABLEDELAYEDEXPANSION SETLOCAL ENABLEDELAYEDEXPANSION
SET "repo=https://git.mylloon.fr/Anri/confOS/raw/branch/main" SET "repo=https://git.mylloon.fr/Anri/confOS/raw/branch/main"
SET "local=%HOMEPATH%\Documents\Local"
:: Executed as normal user :: Executed as normal user
MKDIR %HOMEPATH%\Documents\Local 2>NUL MKDIR !local! 2>NUL
fltmc >NUL 2>&1 || ( fltmc >NUL 2>&1 || (
:: === Install Spotify == :: === Install Spotify ==
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/blockthespot.bat -OutFile '%HOMEPATH%\Documents\Local\blockthespot.bat'" PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/blockthespot.bat -OutFile '!local!\blockthespot.bat'"
DEL "%APPDATA%\Spotify" DEL "%APPDATA%\Spotify"
ECHO Y| CMD /c "%HOMEPATH%\Documents\Local\blockthespot.bat" yes ECHO Y| CMD /c "!local!\blockthespot.bat" yes
PowerShell -Command "Stop-Process -Name Spotify -ErrorAction SilentlyContinue" PowerShell -Command "Stop-Process -Name Spotify -ErrorAction SilentlyContinue"
:: Start as administrator :: Start as administrator
@ -212,14 +213,14 @@ PowerShell -Command "" ^
:: PowerShell -Command "Install-Module -Name PSWindowsUpdate -Force" :: PowerShell -Command "Install-Module -Name PSWindowsUpdate -Force"
:: === Scripts == :: === Scripts ==
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/ctmpf.bat -OutFile '%HOMEPATH%\Documents\Local\ctmpf.bat'" PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/ctmpf.bat -OutFile '!local!\ctmpf.bat'"
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/update.bat -OutFile '%HOMEPATH%\Documents\Local\update.bat'" PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/update.bat -OutFile '!local!\update.bat'"
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/fix_nvidia_wsl.bat -OutFile '%HOMEPATH%\Documents\Local\fix_nvidia_wsl.bat'" PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/fix_nvidia_wsl.bat -OutFile '!local!\fix_nvidia_wsl.bat'"
:: PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/fix_obs_shortcut.bat -OutFile '%HOMEPATH%\Documents\Local\fix_obs_shortcut.bat'" :: PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/fix_obs_shortcut.bat -OutFile '!local!\fix_obs_shortcut.bat'"
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/vencord_installer.bat -OutFile '%HOMEPATH%\Documents\Local\vencord_installer.bat'" PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/vencord_installer.bat -OutFile '!local!\vencord_installer.bat'"
:: === Install Vencord == :: === Install Vencord ==
CMD /c "%HOMEPATH%\Documents\Local\vencord_installer.bat" yes CMD /c "!local!\vencord_installer.bat" yes
:: === Install OpenTabletDriver == :: === Install OpenTabletDriver ==
ECHO OpenTabletDriver... ECHO OpenTabletDriver...
@ -272,7 +273,7 @@ RENAME "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Prism Launcher.lnk" Mine
:: "--startreplaybuffer --profile ""ReplayBuffer"""" --scene ""ReplayBuffer""""';" ^ :: "--startreplaybuffer --profile ""ReplayBuffer"""" --scene ""ReplayBuffer""""';" ^
:: "$Shortcut.Save()" :: "$Shortcut.Save()"
:: :: Default shortcut should start default profile :: :: Default shortcut should start default profile
:: CALL %HOMEPATH%\Documents\Local\fix_obs_shortcut.bat yes :: CALL !local!\fix_obs_shortcut.bat yes
:: :: Allow system to go in sleep mode when OBS is running :: :: Allow system to go in sleep mode when OBS is running
:: powercfg -requestsoverride process obs64.exe display system awaymode :: powercfg -requestsoverride process obs64.exe display system awaymode