From 358d146565aa6a2dfd76d73cdc566ac666d953ae Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 5 Apr 2023 12:36:58 +0200 Subject: [PATCH] * use delayed expansion * format --- windows/blockthespot.bat | 2 +- windows/ctmpf.bat | 4 ++-- windows/fix_nvidia_wsl.bat | 4 ++-- windows/update.bat | 4 ++-- windows11.bat | 13 +++++++------ 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/windows/blockthespot.bat b/windows/blockthespot.bat index b09afb4..90cc717 100644 --- a/windows/blockthespot.bat +++ b/windows/blockthespot.bat @@ -1,4 +1,4 @@ -@ECHO off +@ECHO OFF :: Patch spotify PowerShell -Command "[Net.ServicePointManager]::SecurityProtocol =" ^ diff --git a/windows/ctmpf.bat b/windows/ctmpf.bat index 33ee2ef..3e73036 100644 --- a/windows/ctmpf.bat +++ b/windows/ctmpf.bat @@ -1,7 +1,7 @@ -@ECHO off +@ECHO OFF :: Start as administrator -fltmc > NUL 2>&1 || ( +fltmc > NUL 2> &1 || ( PowerShell Start -Verb RunAs '%0' 2> NUL || ( EXIT 1 ) diff --git a/windows/fix_nvidia_wsl.bat b/windows/fix_nvidia_wsl.bat index e1270b2..8561757 100644 --- a/windows/fix_nvidia_wsl.bat +++ b/windows/fix_nvidia_wsl.bat @@ -1,7 +1,7 @@ -@ECHO off +@ECHO OFF :: Start as administrator -fltmc > NUL 2>&1 || ( +fltmc > NUL 2> &1 || ( PowerShell Start -Verb RunAs '%0' 2> NUL || ( EXIT 1 ) diff --git a/windows/update.bat b/windows/update.bat index 97bf940..b39dbcd 100644 --- a/windows/update.bat +++ b/windows/update.bat @@ -1,7 +1,7 @@ -@ECHO off +@ECHO OFF :: Start as administrator -fltmc > NUL 2>&1 || ( +fltmc > NUL 2> &1 || ( PowerShell Start -Verb RunAs '%0' 2> NUL || ( EXIT 1 ) diff --git a/windows11.bat b/windows11.bat index bf752a8..c26add1 100644 --- a/windows11.bat +++ b/windows11.bat @@ -1,11 +1,12 @@ -@ECHO off +@ECHO OFF +SETLOCAL ENABLEDELAYEDEXPANSION :: Start as administrator -fltmc > NUL 2>&1 || ( +fltmc > NUL 2> &1 || ( PowerShell Start -Verb RunAs '%0' 2> NUL || ( - exit 1 + EXIT 1 ) - exit 0 + EXIT 0 ) :: === Right click of Windows 10 == @@ -92,8 +93,8 @@ wsl --install "%ProgramFiles%\Mozilla Firefox\firefox.exe" TASKKILL /im firefox.exe /F -for /F %%i in ('dir /B /S ^"%APPDATA%\Mozilla\Firefox\Profiles\*.default-release^"') do set vbc=%%i -PowerShell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/user.js -OutFile '%vbc%/user.js'" +FOR /F %%i IN ('dir /B /S ^"%APPDATA%\Mozilla\Firefox\Profiles\*.default-release^"') DO SET "vbc=%%i" +PowerShell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/user.js -OutFile '!vbc!/user.js'" PowerShell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/extensions/Dark-Reader-Settings.json -OutFile '%HOMEPATH%\Downloads\Dark-Reader-Settings.json'" PowerShell -Command "Invoke-WebRequest -Uri https://git.mylloon.fr/Anri/confOS/raw/branch/main/.mozilla/firefox/extensions/SponsorBlockConfig.json -OutFile '%HOMEPATH%\Downloads\SponsorBlockConfig.json'"