Skip to content

Instantly share code, notes, and snippets.

@wincmd64
Last active May 18, 2024 11:26
Show Gist options
  • Save wincmd64/03fb9290512f201ea9b3907449fbf9e3 to your computer and use it in GitHub Desktop.
Save wincmd64/03fb9290512f201ea9b3907449fbf9e3 to your computer and use it in GitHub Desktop.
:: Adds the "Emsisoft Scanner" item to the files and folders menu
:: https://t.me/wincmd64
:: USAGE:
:: 1. Download and unpack: https://www.emsisoft.com/en/commandline-scanner/
:: for x64 -- https://dl.emsisoft.com/EmsisoftCommandlineScanner64.exe
:: for x32 -- https://dl.emsisoft.com/EmsisoftCommandlineScanner32.exe
:: 2. Add the unpacked directory to PATH
:: 3. Put this file in unpacked directory and run
@echo off
if exist "%~dp0a2cmd.exe" (
echo install menu?
pause
) else (
echo a2cmd.exe not found
pause
exit
)
del "%~dp0elevatea2cmd.vbs"
echo CreateObject("Shell.Application").ShellExecute "cmd.exe", "/c a2cmd.exe " ^& Chr(34) ^& Wscript.Arguments.Item(0) ^& Chr(34) ^& " /a /pup /cloud=0 & pause", "", "runas", 1 >> "%~dp0elevatea2cmd.vbs"
REG DELETE "HKCU\Software\Classes\*\shell\AntiMalware" /f
REG DELETE "HKCU\Software\Classes\Directory\shell\AntiMalware" /f
SET KEY=HKCU\Software\Classes\*\shell\AntiMalware
REG ADD "%KEY%" /f
REG ADD "%KEY%" /VE /D "Emsisoft Scanner" /f
REG ADD "%KEY%" /V Icon /D "%~dp0a2cmd.exe" /f
SET KEY=HKCU\Software\Classes\*\shell\AntiMalware\Command
REG ADD "%KEY%" /f
REG ADD "%KEY%" /f /ve /d "WScript.exe \"%~dp0elevatea2cmd.vbs\" \"%%1\""
SET KEY=HKCU\Software\Classes\Directory\shell\AntiMalware
REG ADD "%KEY%" /f
REG ADD "%KEY%" /VE /D "Emsisoft Scanner" /f
REG ADD "%KEY%" /V Icon /D "%~dp0a2cmd.exe" /f
SET KEY=HKCU\Software\Classes\Directory\shell\AntiMalware\Command
REG ADD "%KEY%" /f
REG ADD "%KEY%" /f /ve /d "WScript.exe \"%~dp0elevatea2cmd.vbs\" \"%%1\""
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment