Skip to content

Instantly share code, notes, and snippets.

@TerAnYu
Created October 11, 2022 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TerAnYu/d1299b5fa1582ed6b7ac655857f659c2 to your computer and use it in GitHub Desktop.
Save TerAnYu/d1299b5fa1582ed6b7ac655857f659c2 to your computer and use it in GitHub Desktop.
Добавить исключение для CryptoPro
@echo off
setlocal
setlocal enabledelayedexpansion
rem https://www.cryptopro.ru/forum2/default.aspx?g=posts&t=20281
set fname=%1
echo fullname: %fname%
for %%f in (%fname%) do (start powershell -command "&{start-process -filepath reg '"ADD """HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\CProExclude\%%~nf""" /V """FileName""" /T REG_SZ /D """%%~nxf""" /F"' -verb RunAs}")
endlocal
pause
exit /b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment