标题: 两个常用右键批处理无法加密,请高手指教(已解决)
[打印本页]
作者: heicai
时间: 2007-1-25 22:14
标题: 两个常用右键批处理无法加密,请高手指教(已解决)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\heicai]
@="记事本打开此文件"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\heicai\command]
@="notepad.exe \"%1\""
---------------------------------------
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory]
@="文件夹"
"AlwaysShowExt"=""
"EditFlags"=hex:d2,01,00,00
"InfoTip"="prop:Comment"
[HKEY_CLASSES_ROOT\Directory\shell]
@="none"
[HKEY_CLASSES_ROOT\Directory\shell\cmd]
@="打开命令行窗口"
[HKEY_CLASSES_ROOT\Directory\shell\cmd\command]
@="cmd.exe /k \"cd %L\""
-----------------------------------------
由于变量关系加密后几个%就不见了,导致功能失效。请教各位有办法吗?
我加密用的是“pengfei批处理加密解密系列”。另外用quick batch file compiler转换EXE也会出现这问题。
[
Last edited by heicai on 2007-1-25 at 09:37 AM ]
作者: ccwan
时间: 2007-1-25 22:16
楼主这是reg文件,不是批处理吧?
作者: heicai
时间: 2007-1-25 22:24
对不起,我没讲清楚。
我是这样写的
echo Windows Registry Editor Version 5.00 >%systemroot%\txt.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell]>>%systemroot%\txt.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\heicai]>>%systemroot%\txt.reg
echo @="用记事本打开此文件">>%systemroot%\txt.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\heicai\command]>>%systemroot%\txt.reg
echo @="notepad.exe \"%1\"" >>%systemroot%\txt.reg
regedit.exe /s %systemroot%\txt.reg
del /F /Q %systemroot%\txt.reg
可是加密后会失败
作者: heicai
时间: 2007-1-25 22:36
我发现了,把%变%%就OK了!谢谢各位
作者: ccwan
时间: 2007-1-25 22:45
这不是加密的问题,而是你的代码不对,试试把%1换成%%1吧。
竟然多余了。^_^