how to install standard modem in windows xp

杀马特。学长 韩版系。学妹 提交于 2020-01-06 08:04:14

问题


I am new to windows programming but have programming experience on linux platform.

Anybody can please clarify the following.

I need to install a modem in windows xp through c program or batch script. Modem i have is a serial modem.Whenever i connect the modem that is coming as a serial port.I have to install that modem using windows standard medem driver(Modem.sys).That i have done through control panel item "phone and modem" . But i want to do that installation using c program or batch script. Can anybody please give some suggestions? Or is that possible to create dial up connection without installation to connect to gprs network ?


回答1:


Perhaps the MSDN article How To Programmatically Install Modem Drivers which includes rhis call to runDll32.exe can help

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

The article is very old and references Windows NT version 4.0 but then again I'm not convinced you not a time traveler asking this question from the late 90's




回答2:


Look at this page : http://support2.microsoft.com/default.aspx?scid=kb;EN-US;Q304294

I encountered the same problem as you did, and I've succeeded with this solution on win7 64bit system. You should download source files from this page and compile it with WDK (I use WDK7.1) . Attention, the original source is compiled by DDK, and it will failed linking under WDK. So you should add one line to file 'SOURCES':

  USE_MSVCRT = 1

When build passes, you'll get an executable 'mdminst.exe'. Then you could install any modem you want by CLI:

C:\> mdminst <modem-inf-file> <COM port> <HardwareID>

Ex. to install an standard 33600bps modem on COM1, the command is:

mdminst c:\windows\inf\mdmgen.inf COM1 mdmgen336


来源:https://stackoverflow.com/questions/7688048/how-to-install-standard-modem-in-windows-xp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!