|
我想打造绿色软件Uedit32.exe的时候,想在没打开软件的时候通过双击一个文件就能注册软件的右键菜单,用ATR.EXE软件监视注册表后发现得的结果是如下:
***********************************************************************************
Windows Registry Editor Version 5.00
[HKEY_USERS\S-1-5-21-790525478-630328440-1801674531-500_Classes\*]
[HKEY_USERS\S-1-5-21-790525478-630328440-1801674531-500_Classes\*\shellex]
[HKEY_USERS\S-1-5-21-790525478-630328440-1801674531-500_Classes\*\shellex\ContextMenuHandlers]
[HKEY_USERS\S-1-5-21-790525478-630328440-1801674531-500_Classes\*\shellex\ContextMenuHandlers\UltraEdit]
@="{b5eedee0-c06e-11cf-8c56-444553540000}"
[HKEY_USERS\S-1-5-21-790525478-630328440-1801674531-500_Classes\CLSID\{b5eedee0-c06e-11cf-8c56-444553540000}\InProcServer32]
@="D:\\Program Files\\UltraEdit15.10\\ue32ctmn.dll"
"ThreadingModel"="Apartment"
*************************************************************************************
用reg 转bat 如下:
**************************************************************************************
@ECHO OFF
> "%Temp%.\DefOpen.reg" ECHO Windows Registry Editor Version 5.00
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_USERS\S-1-5-21-790525478-630328440-1801674531-500_Classes\*]
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_USERS\S-1-5-21-790525478-630328440-1801674531-500_Classes\*\shellex]
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_USERS\S-1-5-21-790525478-630328440-1801674531-500_Classes\*\shellex\ContextMenuHandlers]
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_USERS\S-1-5-21-790525478-630328440-1801674531-500_Classes\*\shellex\ContextMenuHandlers\UltraEdit]
>>"%Temp%.\DefOpen.reg" ECHO @="{b5eedee0-c06e-11cf-8c56-444553540000}"
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO [HKEY_USERS\S-1-5-21-790525478-630328440-1801674531-500_Classes\CLSID\{b5eedee0-c06e-11cf-8c56-444553540000}\InProcServer32]
>>"%Temp%.\DefOpen.reg" ECHO @="D:\\Program Files\\UltraEdit15.10\\ue32ctmn.dll"
>>"%Temp%.\DefOpen.reg" ECHO "ThreadingModel"="Apartment"
>>"%Temp%.\DefOpen.reg" ECHO.
>>"%Temp%.\DefOpen.reg" ECHO.
START /WAIT REGEDIT "%Temp%.\DefOpen.reg"
DEL "%Temp%.\DefOpen.reg"
***************************************************************************************************
在这其中这个路径用批处来写,而且还要是带变量路径的话该如何来写呢?
[HKEY_USERS\S-1-5-21-790525478-630328440-1801674531-500_Classes\CLSID\{b5eedee0-c06e-11cf-8c56-444553540000}\InProcServer32]
@="D:\\Program Files\\UltraEdit15.10\\ue32ctmn.dll"
现在我的目录是这个位置,这个软件如果做成绿色的话,我不一定放在这个目录,有可能是其它的目录,用 echo "%~dp0ue32ctmn.dll"不能显示双斜路径,请问有没有高手我如何才能做的到用批处来写这个命令呢?
请各位高手指教!!! |
|