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

Jerold Schulman

December 17, 1997

1 Min Read
ITPro Today logo in a gray background | ITPro Today

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%system32cpashel.inf /T NTN_InstallMode = Install
  /T NTN_Origination = install /T NTN_Infname = OEMSETUP.INF
  /T NTN_SRCPATH = :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%system32cpashel.inf /T NTN_InstallMode = Install
  /T NTN_Origination = install /T NTN_Infname = .OEMNSVTP.INF
  /T NTN_SRCPATH = :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


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like