Installing a .inf file using a windows batch file

后端 未结 3 1866
轻奢々
轻奢々 2021-02-10 10:45

When you right click on a .inf file you have an option to \"Install\". I want to install a .inf file from the command line using a batch file. What is the \"right\" way to do th

3条回答
  •  时光说笑
    2021-02-10 11:25

    rem tested/works
    
    :inf
    ver | findstr /il "Version 6." > nul 
    if %ERRORLEVEL%==0 goto :vista
    
    :xp
    start/wait rundll32.exe setupapi,InstallHinfSection DefaultInstall 4 %_%
    goto :eof
    :vista
    %SystemRoot%\System32\InfDefaultInstall.exe "%_%"
    
    :eof
    

提交回复
热议问题