XanderYe的个人小站

使用批处理禁止流氓exe或dll

用批处理禁用文件权限, 右键新建一个bat,粘贴

@echo off&pushd %~dp0
%1 %2
mshta vbscript:createobject("shell.application").shellexecute("%~s0","goto :runas","","runas",1)(window.close)&&exit
:runas

icacls 路径\xxx.exe /deny Everyone:F
pause

还原权限代码:

@echo off&pushd %~dp0
%1 %2
mshta vbscript:createobject("shell.application").shellexecute("%~s0","goto :runas","","runas",1)(window.close)&&exit
:runas

icacls 路径\xxx.exe /reset
pause
赞赏

发表回复

textsms
account_circle
email
11 + 28 = ?
verified user

 

XanderYe的个人小站

使用批处理禁止流氓exe或dll
用批处理禁用文件权限, 右键新建一个bat,粘贴 @echo off&pushd %~dp0 %1 %2 mshta vbscript:createobject("shell.application").shellexecute("%~s0","goto :runas","","runas"…
扫描二维码继续阅读
2019-04-03