|
原帖由 老毛桃 于 2006-8-24 13:15 发表
我用这个办法确定路径
FOR %%I IN (C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%I:\XPEMENU.INI SET RP=%%I
嘿嘿,搞定了!
EXE_REG.CMD- @ECHO OFF
- FOR %%I IN (C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%I:\XPEMENU.INI SET RP=%%I
- reg add HKLM\SOFTWARE\Classes\Ghost\shell\open\command /ve /t REG_SZ /d ""%RP%:\外置程序\GHOST8\GHOSTEXP.EXE" ""%%1" /f >NUL
- reg add HKLM\SOFTWARE\Classes\UltraISO\DefaultIcon /ve /t REG_SZ /d "%RP%:\外置程序\ULTRAISO\UltraISO.exe,0" /f >NUL
- reg add HKLM\SOFTWARE\Classes\UltraISO\shell\open\command /ve /t REG_SZ /d ""%RP%:\外置程序\ULTRAISO\UltraISO.exe" ""%%1" /f >NUL
- reg add HKLM\SOFTWARE\Classes\WinImage\DefaultIcon /ve /t REG_SZ /d "%RP%:\外置程序\WINIMAGE\WINIMAGE.EXE,0" /f >NUL
- reg add HKLM\SOFTWARE\Classes\WinImage\shell\Extract\command /ve /t REG_SZ /d ""%RP%:\外置程序\WINIMAGE\WINIMAGE.EXE" /e ""%%1" /f >NUL
- reg add HKLM\SOFTWARE\Classes\WinImage\shell\open\command /ve /t REG_SZ /d ""%RP%:\外置程序\WinImage\WinImage.exe" ""%%1" /f >NUL
复制代码
以上仅仅是涉及到路径的部分,不涉及路径的部分预先写进注册表,比如以下的,就先写进注册表- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.bwz\
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.bwz\@
- 值: 字符串: "WinImage"
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.dsk\
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.dsk\@
- 值: 字符串: "WinImage"
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.gho\
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.gho\@
- 值: 字符串: "Ghost"
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.ima\
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.ima\@
- 值: 字符串: "WinImage"
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.img\
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.img\@
- 值: 字符串: "WinImage"
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.imz\
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.imz\@
- 值: 字符串: "WinImage"
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.iso\
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.iso\@
- 值: 字符串: "UltraISO"
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.vfd\
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.vfd\@
- 值: 字符串: "WinImage"
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.wil\
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.wil\@
- 值: 字符串: "WinImage"
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.wlz\
- HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.wlz\@
- 值: 字符串: "WinImage"
复制代码 只有需要涉及路径的部分采用这个批处理来完成
- 自启动程序=%SystemRoot%\SYSTEM32\HIDECMD.EXE %SystemRoot%\SYSTEM32\EXE_REG.CMD
复制代码
[ 本帖最后由 老毛桃 于 2006-8-24 02:19 PM 编辑 ] |
|