From 0a447af78f34f894616e444f3dc2a89d82ddd70b Mon Sep 17 00:00:00 2001 From: Gurucharan S <70633240+GurucharanSavanth@users.noreply.github.com> Date: Thu, 22 May 2025 11:54:43 +0530 Subject: [PATCH 1/3] Update Remove Windows AI.ps1 Updated RemoveWindowsAI.ps1 link --- plugins/Remove Windows AI.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Remove Windows AI.ps1 b/plugins/Remove Windows AI.ps1 index eefcdee..d059166 100644 --- a/plugins/Remove Windows AI.ps1 +++ b/plugins/Remove Windows AI.ps1 @@ -1 +1 @@ -iwr https://raw.githubusercontent.com/zoicware/RemoveWindowsAI/main/RemoveAi.ps1 | iex \ No newline at end of file +iwr https://raw.githubusercontent.com/zoicware/RemoveWindowsAI/main/RemoveWindowsAi.ps1 | iex From e0f434f4ea12b69f7da53143c32c3a9e24c14a5a Mon Sep 17 00:00:00 2001 From: Gurucharan S <70633240+GurucharanSavanth@users.noreply.github.com> Date: Thu, 22 May 2025 13:19:29 +0530 Subject: [PATCH 2/3] Add Run-ScriptMenu.bat self-elevating script launcher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce a new batch file, Run-ScriptMenu.bat, that: Elevates itself once via UAC at startup Auto-discovers up to 9 .ps1 files in its folder Presents a numbered, single-keystroke menu (0 = Exit) Runs the selected script in the same elevated session Loops back for multiple executions without re-prompting UAC Uses Start-Process -Verb RunAs for elevation Leverages CHOICE and delayed expansion for input handling Sorts scripts alphabetically for predictable ordering Exits cleanly on invalid input or when “0” is selected --- plugins/Run-ScriptMenu.bat.bat | 55 ++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 plugins/Run-ScriptMenu.bat.bat diff --git a/plugins/Run-ScriptMenu.bat.bat b/plugins/Run-ScriptMenu.bat.bat new file mode 100644 index 0000000..b459178 --- /dev/null +++ b/plugins/Run-ScriptMenu.bat.bat @@ -0,0 +1,55 @@ +@echo off +:: Run-ScriptMenu.bat — one-UAC, loop-back launcher for *.ps1 files +:: Place this BAT next to your scripts and double-click. + +rem ----------------- self-elevate once ----------------- +>nul 2>&1 "%SystemRoot%\system32\cacls.exe" "%SystemRoot%\system32\config\system" +if errorlevel 1 ( + powershell -NoProfile -Command "Start-Process '%~f0' -Verb RunAs" + exit /b +) + +title Run PowerShell Script (Administrator) +setlocal EnableDelayedExpansion +cd /d "%~dp0" + +:Build + set "i=0" + for /f "delims=" %%F in ('dir /b /a:-d "*.ps1" ^| sort') do ( + if !i! lss 9 ( + set /a i+=1 + set "script!i!=%%F" + ) + ) + if !i! equ 0 ( + echo No .ps1 files found beside this BAT. + pause & exit /b + ) +goto Menu + +:Menu + cls + echo --------------------------------------------- + echo Run PowerShell Script (admin session) + echo --------------------------------------------- + for /L %%N in (1,1,!i!) do echo %%N. !script%%N! + echo 0. Exit + echo. + + choice /c 0123456789 /n /m "Pick number (0-Exit): " + set /a idx=%errorlevel%-1 + if !idx! equ 0 exit /b + if !idx! gtr !i! ( + echo Invalid choice – try again. + timeout /t 1 >nul + goto Menu + ) + + set "file=!script%idx%!" + echo. + echo === Running "!file!" … + powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0!file!" + echo ------------------------------------------------- + echo Done. Press any key to return to the menu. + pause >nul +goto Menu From 4fdd1928b4e22f867406752fda3135d79c2a456d Mon Sep 17 00:00:00 2001 From: Gurucharan S <70633240+GurucharanSavanth@users.noreply.github.com> Date: Sat, 24 May 2025 20:58:20 +0530 Subject: [PATCH 3/3] Delete plugins/Run-ScriptMenu.bat.bat --- plugins/Run-ScriptMenu.bat.bat | 55 ---------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 plugins/Run-ScriptMenu.bat.bat diff --git a/plugins/Run-ScriptMenu.bat.bat b/plugins/Run-ScriptMenu.bat.bat deleted file mode 100644 index b459178..0000000 --- a/plugins/Run-ScriptMenu.bat.bat +++ /dev/null @@ -1,55 +0,0 @@ -@echo off -:: Run-ScriptMenu.bat — one-UAC, loop-back launcher for *.ps1 files -:: Place this BAT next to your scripts and double-click. - -rem ----------------- self-elevate once ----------------- ->nul 2>&1 "%SystemRoot%\system32\cacls.exe" "%SystemRoot%\system32\config\system" -if errorlevel 1 ( - powershell -NoProfile -Command "Start-Process '%~f0' -Verb RunAs" - exit /b -) - -title Run PowerShell Script (Administrator) -setlocal EnableDelayedExpansion -cd /d "%~dp0" - -:Build - set "i=0" - for /f "delims=" %%F in ('dir /b /a:-d "*.ps1" ^| sort') do ( - if !i! lss 9 ( - set /a i+=1 - set "script!i!=%%F" - ) - ) - if !i! equ 0 ( - echo No .ps1 files found beside this BAT. - pause & exit /b - ) -goto Menu - -:Menu - cls - echo --------------------------------------------- - echo Run PowerShell Script (admin session) - echo --------------------------------------------- - for /L %%N in (1,1,!i!) do echo %%N. !script%%N! - echo 0. Exit - echo. - - choice /c 0123456789 /n /m "Pick number (0-Exit): " - set /a idx=%errorlevel%-1 - if !idx! equ 0 exit /b - if !idx! gtr !i! ( - echo Invalid choice – try again. - timeout /t 1 >nul - goto Menu - ) - - set "file=!script%idx%!" - echo. - echo === Running "!file!" … - powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0!file!" - echo ------------------------------------------------- - echo Done. Press any key to return to the menu. - pause >nul -goto Menu