|
- @echo off
- if not exist "%~dp0CoolInstall.exe" echo 请将此批处理文件放置在 CoolInstall 所在目录再执行! & pause>nul & goto end
- reg query "HKLM\SOFTWARE\Classes\.wim" /ve >nul 2>nul
- if %errorlevel% equ 0 goto assocwim
- reg add "HKLM\SOFTWARE\Classes\.wim" /ve /t REG_SZ /d cifile /f
- reg add "HKLM\SOFTWARE\Classes\cifile\shell\open" /ve /t REG_SZ /d "用 &CoolInstall 安装" /f
- reg add "HKLM\SOFTWARE\Classes\cifile\shell\open" /v Icon /t REG_SZ /d "%~dp0CoolInstall.exe" /f
- reg add "HKLM\SOFTWARE\Classes\cifile\shell\open\command" /ve /t REG_SZ /d "%~dp0CoolInstall.exe /Source:%%1" /f
- :Return2
- reg query "HKLM\SOFTWARE\Classes\.esd" /ve >nul 2>nul
- if %errorlevel% equ 0 goto AssocESD
- reg add "HKLM\SOFTWARE\Classes\.esd" /ve /t REG_SZ /d cifile /f
- reg add "HKLM\SOFTWARE\Classes\cifile\shell\open" /ve /t REG_SZ /d "用 &CoolInstall 安装" /f
- reg add "HKLM\SOFTWARE\Classes\cifile\shell\open" /v Icon /t REG_SZ /d "%~dp0CoolInstall.exe" /f
- reg add "HKLM\SOFTWARE\Classes\cifile\shell\open\command" /ve /t REG_SZ /d "%~dp0CoolInstall.exe /Source:%%1" /f
- :Return3
- reg query "HKLM\SOFTWARE\Classes\.gho" /ve >nul 2>nul
- if %errorlevel% equ 0 goto AssocGHO
- reg add "HKLM\SOFTWARE\Classes\.gho" /ve /t REG_SZ /d cifile /f
- reg add "HKLM\SOFTWARE\Classes\cifile\shell\open" /ve /t REG_SZ /d "用 &CoolInstall 安装" /f
- reg add "HKLM\SOFTWARE\Classes\cifile\shell\open" /v Icon /t REG_SZ /d "%~dp0CoolInstall.exe" /f
- reg add "HKLM\SOFTWARE\Classes\cifile\shell\open\command" /ve /t REG_SZ /d "%~dp0CoolInstall.exe /Source:%%1" /f
- :Return4
- reg query "HKLM\SOFTWARE\Classes\.iso" /ve >nul 2>nul
- if %errorlevel% equ 0 goto AssocISO
- reg add "HKLM\SOFTWARE\Classes\.iso" /ve /t REG_SZ /d cifile /f
- reg add "HKLM\SOFTWARE\Classes\cifile\shell\open" /ve /t REG_SZ /d "用 &CoolInstall 安装" /f
- reg add "HKLM\SOFTWARE\Classes\cifile\shell\open" /v Icon /t REG_SZ /d "%~dp0CoolInstall.exe" /f
- reg add "HKLM\SOFTWARE\Classes\cifile\shell\open\command" /ve /t REG_SZ /d "%~dp0CoolInstall.exe /Source:%%1" /f
- goto end
- :AssocWIM
- for /f "skip=2 tokens=2* delims= " %%i in ('reg query "HKLM\SOFTWARE\Classes\.wim" /ve') do call set WIMType=%%j
- reg add "HKLM\SOFTWARE\Classes\%WIMType%\shell\CIS" /ve /t REG_SZ /d "用 &CoolInstall 安装" /f
- reg add "HKLM\SOFTWARE\Classes\%WIMType%\shell\CIS" /v Icon /t REG_SZ /d "%~dp0CoolInstall.exe" /f
- reg add "HKLM\SOFTWARE\Classes\%WIMType%\shell\CIS\command" /ve /t REG_SZ /d "%~dp0CoolInstall.exe /Source:%%1" /f
- goto Return2
- :AssocESD
- for /f "skip=2 tokens=2* delims= " %%i in ('reg query "HKLM\SOFTWARE\Classes\.esd" /ve') do call set ESDType=%%j
- reg add "HKLM\SOFTWARE\Classes\%ESDType%\shell\CIS" /ve /t REG_SZ /d "用 &CoolInstall 安装" /f
- reg add "HKLM\SOFTWARE\Classes\%ESDType%\shell\CIS" /v Icon /t REG_SZ /d "%~dp0CoolInstall.exe" /f
- reg add "HKLM\SOFTWARE\Classes\%ESDType%\shell\CIS\command" /ve /t REG_SZ /d "%~dp0CoolInstall.exe /Source:%%1" /f
- goto Return3
- :AssocGHO
- for /f "skip=2 tokens=2* delims= " %%i in ('reg query "HKLM\SOFTWARE\Classes\.gho" /ve') do call set GHOType=%%j
- reg add "HKLM\SOFTWARE\Classes\%GHOType%\shell\CIS" /ve /t REG_SZ /d "用 &CoolInstall 安装" /f
- reg add "HKLM\SOFTWARE\Classes\%GHOType%\shell\CIS" /v Icon /t REG_SZ /d "%~dp0CoolInstall.exe" /f
- reg add "HKLM\SOFTWARE\Classes\%GHOType%\shell\CIS\command" /ve /t REG_SZ /d "%~dp0CoolInstall.exe /Source:%%1" /f
- goto Return4
- :AssocISO
- for /f "skip=2 tokens=2* delims= " %%i in ('reg query "HKLM\SOFTWARE\Classes\.iso" /ve') do call set ISOType=%%j
- reg add "HKLM\SOFTWARE\Classes\%ISOType%\shell\CIS" /ve /t REG_SZ /d "用 &CoolInstall 安装" /f
- reg add "HKLM\SOFTWARE\Classes\%ISOType%\shell\CIS" /v Icon /t REG_SZ /d "%~dp0CoolInstall.exe" /f
- reg add "HKLM\SOFTWARE\Classes\%ISOType%\shell\CIS\command" /ve /t REG_SZ /d "%~dp0CoolInstall.exe /Source:%%1" /f
- goto end
- :end
复制代码
|
评分
-
查看全部评分
|