Created
July 1, 2022 04:46
-
-
Save maciakl/686a1f9b6bcc1d7d33b88320c2a1e094 to your computer and use it in GitHub Desktop.
Revisions
-
maciakl created this gist
Jul 1, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ @echo off if "%1" == "elevated" goto start powershell -command "Start-Process %~nx0 elevated -Verb runas" goto :eof :start @echo off cls echo. echo. echo StorageSense Helper echo =================== echo. CALL :CHECK echo. choice /M "Enable, Disable, or Quit" /C EDQ if %ERRORLEVEL% == 1 ( CALL :ENABLE ) if %ERRORLEVEL% == 2 ( CALL :DISABLE ) if %ERRORLEVEL% == 3 ( goto :eof ) goto :start :DISABLE reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\StorageSense" /v AllowStorageSenseGlobal /t REG_DWORD /d 0 /f echo. goto :eof :ENABLE reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\StorageSense" /v AllowStorageSenseGlobal /t REG_DWORD /d 1 /f echo. goto :eof :CHECK echo. reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows\StorageSense" /v AllowStorageSenseGlobal echo. goto :eof