WizardKit/Diagnostics/Autoruns.cmd
Alan Mason d9dddebccb 2016-09: Retroactive Updates
Major .bin and extraction code overhaul

* All .cmd files now have code for searching the for the .bin folder
  * This starts at the script's parent folder and moves upward
  * If no .bin folder is found then print an error to the screen

* 7z has been replaced with 7za
  * This is for better handling of x32/x64 usage
  * This also fixed a few bugs with extracting ProduKey/MailPassView/etc
  * We no longer require the full power of 7z.exe/7z.dll
  * (Since wimlib-imagex will probably be used for WIM files soon-ish)

* Bugfixes
  * A few calls of pushd were unsafe (without quotes)
  * SFC scan no longer closes immediately
2017-11-17 00:51:54 -07:00

51 lines
1.5 KiB
Batchfile

@echo off
:Flags
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on)
)
:FindBin
set bin=
pushd "%~dp0"
:FindBinInner
if exist ".bin" (
set "bin=%cd%\.bin"
goto FindBinDone
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone
popd
if not defined bin goto ErrorNoBin
:ModifySettings
reg add HKCU\Software\Sysinternals\AutoRuns /v checkvirustotal /t REG_DWORD /d 1 /f >nul
reg add HKCU\Software\Sysinternals\AutoRuns /v EulaAccepted /t REG_DWORD /d 1 /f >nul
reg add HKCU\Software\Sysinternals\AutoRuns /v shownomicrosoft /t REG_DWORD /d 1 /f >nul
reg add HKCU\Software\Sysinternals\AutoRuns /v shownowindows /t REG_DWORD /d 1 /f >nul
reg add HKCU\Software\Sysinternals\AutoRuns /v showonlyvirustotal /t REG_DWORD /d 1 /f >nul
reg add HKCU\Software\Sysinternals\AutoRuns /v submitvirustotal /t REG_DWORD /d 0 /f >nul
reg add HKCU\Software\Sysinternals\AutoRuns /v verifysignatures /t REG_DWORD /d 1 /f >nul
reg add HKCU\Software\Sysinternals\AutoRuns\SigCheck /v EulaAccepted /t REG_DWORD /d 1 /f >nul
reg add HKCU\Software\Sysinternals\AutoRuns\Streams /v EulaAccepted /t REG_DWORD /d 1 /f >nul
reg add HKCU\Software\Sysinternals\AutoRuns\VirusTotal /v VirusTotalTermsAccepted /t REG_DWORD /d 1 /f >nul
:Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\SysinternalsSuite" "Autoruns.exe" "-e"
goto Exit
:ErrorNoBin
color 4e
echo ".bin" folder not found, aborting script.
echo.
echo Press any key to exit...
pause>nul
color
goto Exit
:Exit