How To Programmatically Install Modem Drivers (194941)



The information in this article applies to:

  • Microsoft Win32 Device Driver Kit (DDK) for Windows NT 4.0

This article was previously published under Q194941

SUMMARY

In Windows NT version 4.0, you can install a modem using one of the following techniques:

  • Using the Modem Control Panel Applet (Modem.cpl).
  • Using Windows NT's 4.0 unattended Setup.
All other methods, including manually replicating registry changes, are not recommended. This article describes how you can programmatically issue a modem unattended install to the Modem Control Panel Applet.

MORE INFORMATION

First, create a valid Windows NT 4.0 unattended install file. This file must have a [<Modem_Parameter_Section>] section for the modem you are installing. For example:
   [MyModem]
   COM1 = "Dial-Up Networking Serial Cable between 2 PCs"
				

To call the Modem Control Panel Applet from the command line, use the following syntax:

rundll32.exe shell32.dll,Control_RunDLL modem.cpl,Modems,
noui inf=<INF_FileName> sect=<Modem_Parameter_Section>

Where the above command is one line, with no space between "Modems," and "noui". For example (if the example above was saved as c:\MyModem.inf):

rundll32.exe shell32.dll,Control_RunDLL modem.cpl,Modems, noui inf=c:\MyModem.INF sect=MyModem

REFERENCES

For a full description of the [<Modem_Parameter_Section>] Section, please refer to the Windows NT 4.0 unattended install documentation.

Windows NT 4.0 Resource Kit: unattended install

For additional information, please see the following article in the Microsoft Knowledge Base:

155197 Unattended Setup Parameters for Unattend.txt File


Modification Type:MinorLast Reviewed:8/30/2004
Keywords:kbhowto kbNDIS KB194941