安装虚拟光驱支持.CMD 449 B

12345678910111213141516
  1. @ECHO OFF
  2. PUSHD %~DP0
  3. TITLE 安装/卸载虚拟光驱支持
  4. Rd "%WinDir%\system32\test_permissions" >NUL 2>NUL
  5. Md "%WinDir%\System32\test_permissions" 2>NUL||(Echo 请使用右键管理员身份运行!&&Pause >nul&&Exit)
  6. Rd "%WinDir%\System32\test_permissions" 2>NUL
  7. SetLocal EnableDelayedExpansion
  8. SET /P ST=输入y安装,输入n卸载:
  9. if /I "%ST%"=="y" goto Add
  10. if /I "%ST%"=="n" goto Remove
  11. :Add
  12. drivers\IsoCmd.exe -i
  13. exit
  14. :Remove
  15. drivers\IsoCmd.exe -r
  16. exit