Skip navigation

JSI Tip 0360 - Installing Network Components from a batch file.

NOTE: For Windows 2000 or later, see tip 4705.

When you install Network Components using Control Panel, the Ncpa.cpl applet configures setup.exe to call Ncpashel.inf with the appropriate parameters. If you know the INF file to use and the OPTION, you can create a batch file to perform the task. You will, unfortuneatly, have to make any adjustments to Binding manually. Here is the syntax: (on one line)

SETUP.EXE /f /i%systemroot%\system32\ncpashel.inf /T NTN_InstallMode = Install
  /T NTN_Origination = install /T NTN_Infname = <PATH>\OEMSETUP.INF
  /T NTN_SRCPATH = <CD-ROM>:\I386 /T NTN_Infoption = OPTION

Where:

 Parameter             D e s c r i p t i o n 
 /f   Turns off blue background. 
 /T NTN_InstallMode =    Install, Remove, Update, Configure or Bind 
 /T NTN_Origination =    Install 
 /T NTN_Infname =    Path/Name of the INF file. 
 /T NTN_SRCPATH =    Path to the distribution files. 
 /T NTN_Infoption =    Name of the option. To figure out which option has to be installed, open the INF file and search for the section \[Options\]. 

To install Microsoft TCP/IP Printing with a batch file: (The Setup command must be on one line.)

cd %systemroot%
setup /f /i%systemroot%\system32\ncpashel.inf /T NTN_InstallMode = Install
  /T NTN_Origination = install /T NTN_Infname = .\OEMNSVTP.INF
  /T NTN_SRCPATH = <CD-ROM>:\I386 /T NTN_InfOption = TCPPRINT
EXIT

Oemnsvtp.inf is the INF file that directs installation of the Microsoft TCP/IP Printing component. It contains the following section:

\[Options\]
 TCPPRINT


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish