Hi All,
I’ve recently joined this list and I’ve looked at osr archives the
thread “Modem Installation”. I have exactly the same problem as Wim
Vervoorn.
The last response Michael Jones suggest to look at the devcon example
which I did, but I still can not find how one can automatically install
a modem on a particular COMx port.
I have MyModem.inf describing my modem and I need to able to setup one
or more COM ports to use MyModem.
In NT4 this was possible by writing to a text file Unattended.txt :
[MyModems]
COMx1 = “MyModemName”
COMx2 = “MyModemName”
And then executing :
“rundll32.exe shell32.dll,Control_RunDLL modem.cpl,Modems,noui
inf=Unattended.txt sect=MyModems”
Could somebody shed some light why this approach is not working in
Win2k3 and what is the proper way to accomplish this?
Regards,
Danail Kirov
Subject: Re: Modem installation
From: “Michael Jones”
Date: Mon, 27 Sep 2004 09:24:29 -0400
(1) Try devcon.exe in the DDK. You have the source code in the DDK for
devcon.exe also.
Michael Jones
“Mathieu Routhier” wrote in message
news:xxxxx@ntdev…
>
> Instead of manually copying your INF to the INF folder, you should use
> SetupCopyOEMInf() in PlatformSDK. Refer to the DDK topic “Copying
INFs”
for
> more info.
>
> Mat
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Jones
> Sent: Thursday, September 23, 2004 9:33 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Modem installation
>
> (1) If this is a serial modem that is what serenum.sys is for. Also
the
> source code for serenum.sys is in the DDK.
> (2) Just copy your modem inf to %systemroo%\inf.
> (3) Now go into Device Manager and Select Scan for New Hardware. Of
course
> the Scan for New Hardware occurs on a reboot too.
>
> Sincerely;
> William Michael Jones
>
>
> “Wim Vervoorn” wrote in message news:xxxxx@ntdev…
> > Hello all,
> >
> > It might be a stupid question but can anyone tell me what is the
easiest
> way
> > to programmatically install a modem driver. (I have an INF file that
> allows
> > me to do this using the “Add Modem” in control panel but I would
like
to
> be
> > able to do this without the need to start the applet manually!
> >
> > Best regards,
> >
> > Wim Vervoorn
Danail/Mathieu,
Here’s how you install a modem programmatically on a given COM port:
- Create the container for the to-be-created device information element.
- Create the element using the Class GUID and Name from the INF file.
- Add your hardware id to the device’s SPDRP_HARDWAREID property.
- Write the COM port string into the “AttachedTo” value of the device’s sw
instance key.
- Register device as a modem via the SetupDiRegisterDeviceInfo() call.
- Last but not least, bring everything into life via the
UpdateDriverForPlugAndPlayDevices().
These steps have been working for me for years.
Hope that helps,
Ilya Faenson
Subject: RE: Modem Installation 2
From: “Danail Kirov”
>Date: Wed, 18 May 2005 13:33:25 -0700
>X-Message-Number: 18
>
>This is a multi-part message in MIME format.
>
>------_=_NextPart_001_01C55BE8.D7C573DC
>Content-Type: text/plain;
> charset=“us-ascii”
>Content-Transfer-Encoding: quoted-printable
>
>Hi All,
>I’ve recently joined this list and I’ve looked at osr archives the
>thread “Modem Installation”. I have exactly the same problem as Wim
>Vervoorn.
>The last response Michael Jones suggest to look at the devcon example
>which I did, but I still can not find how one can automatically install
>a modem on a particular COMx port.=20
>
>I have MyModem.inf describing my modem and I need to able to setup one
>or more COM ports to use MyModem.
>In NT4 this was possible by writing to a text file Unattended.txt :
>
>[MyModems]
>COMx1 =3D “MyModemName”=20
>COMx2 =3D “MyModemName”=20
>
>And then executing :
>
>“rundll32.exe shell32.dll,Control_RunDLL modem.cpl,Modems,noui
>inf=3DUnattended.txt sect=3DMyModems”
>
>Could somebody shed some light why this approach is not working in
>Win2k3 and what is the proper way to accomplish this?
>
>Regards,
>
>Danail Kirov
>
>
>Subject: Re: Modem installation
>From: “Michael Jones”
>Date: Mon, 27 Sep 2004 09:24:29 -0400=09
>(1) Try devcon.exe in the DDK. You have the source code in the DDK for
>devcon.exe also.
>Michael Jones
>
>“Mathieu Routhier” wrote in message
>news:xxxxx@ntdev…
> >
> > Instead of manually copying your INF to the INF folder, you should use
> > SetupCopyOEMInf() in PlatformSDK. Refer to the DDK topic “Copying
>INFs”
>for
> > more info.
> >
> > Mat
> >
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Jones
> > Sent: Thursday, September 23, 2004 9:33 AM
> > To: Windows System Software Devs Interest List
> > Subject: Re:[ntdev] Modem installation
> >
> > (1) If this is a serial modem that is what serenum.sys is for. Also
>the
> > source code for serenum.sys is in the DDK.
> > (2) Just copy your modem inf to %systemroo%\inf.
> > (3) Now go into Device Manager and Select Scan for New Hardware. Of
>course
> > the Scan for New Hardware occurs on a reboot too.
> >
> > Sincerely;
> > William Michael Jones
> >
> >
> > “Wim Vervoorn” wrote in message news:xxxxx@ntdev…
> > > Hello all,
> > >
> > > It might be a stupid question but can anyone tell me what is the
>easiest
> > way
> > > to programmatically install a modem driver. (I have an INF file that
> > allows
> > > me to do this using the “Add Modem” in control panel but I would
>like
>to
> > be
> > > able to do this without the need to start the applet manually!
> > >
> > > Best regards,
> > >
> > > Wim Vervoorn
RE: Modem Installation 2Thank you Ilya. I looked at the source code for devcon.exe and the install does most of what you are describing. Note will need to to use SetupDiRegisterDeviceIno() in the cmds.cpp to install a modem inf. There you see source that you can copy that can be made to do the steps Illya describes.
Note the following: This may be too simple but it works.
(1) Attach the modem to the com port.
(2) Make sure the inf file in %systemroot%\inf
(3) rescan for new hardware. Now you can use devcon rescan. Note it appears you can speed up the rescan by varying the source to devcon with the rescan an rescan only the devnode and its children you are interested in.
I hope this in addition helps.
Sincerely;
William Michael Jones “Mike”
“Danail Kirov” wrote in message news:xxxxx@ntdev…
Hi All,
I’ve recently joined this list and I’ve looked at osr archives the thread “Modem Installation”. I have exactly the same problem as Wim Vervoorn.
The last response Michael Jones suggest to look at the devcon example which I did, but I still can not find how one can automatically install a modem on a particular COMx port.
I have MyModem.inf describing my modem and I need to able to setup one or more COM ports to use MyModem.
In NT4 this was possible by writing to a text file Unattended.txt :
[MyModems]
COMx1 = “MyModemName”
COMx2 = “MyModemName”
And then executing :
“rundll32.exe shell32.dll,Control_RunDLL modem.cpl,Modems,noui inf=Unattended.txt sect=MyModems”
Could somebody shed some light why this approach is not working in Win2k3 and what is the proper way to accomplish this?
Regards,
Danail Kirov
Subject: Re: Modem installation
From: “Michael Jones”
Date: Mon, 27 Sep 2004 09:24:29 -0400
(1) Try devcon.exe in the DDK. You have the source code in the DDK for
devcon.exe also.
Michael Jones
“Mathieu Routhier” wrote in message
news:xxxxx@ntdev…
>
> Instead of manually copying your INF to the INF folder, you should use
> SetupCopyOEMInf() in PlatformSDK. Refer to the DDK topic “Copying INFs”
for
> more info.
>
> Mat
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Jones
> Sent: Thursday, September 23, 2004 9:33 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Modem installation
>
> (1) If this is a serial modem that is what serenum.sys is for. Also the
> source code for serenum.sys is in the DDK.
> (2) Just copy your modem inf to %systemroo%\inf.
> (3) Now go into Device Manager and Select Scan for New Hardware. Of
course
> the Scan for New Hardware occurs on a reboot too.
>
> Sincerely;
> William Michael Jones
>
>
> “Wim Vervoorn” wrote in message news:xxxxx@ntdev…
> > Hello all,
> >
> > It might be a stupid question but can anyone tell me what is the easiest
> way
> > to programmatically install a modem driver. (I have an INF file that
> allows
> > me to do this using the “Add Modem” in control panel but I would like
to
> be
> > able to do this without the need to start the applet manually!
> >
> > Best regards,
> >
> > Wim Vervoorn
Thank you Ilya and Michael.
I’ve got the setup automated and working now, with one exception. The
most undocumented part was how to setup the “AttachedTo” value. I also
found this Microsoft sample very useful
http:
Unfortunately MyCompany Modem has not passed Windows Logo testing to
verify its compatibility with Windows XP and 2003 and I am getting the
following popup when I call
UpdateDriverForPlugAndPlayDevices( 0,
HardwareID,
InfFilePath,
INSTALLFLAG_FORCE,
&RebootRequired);
Popup description:
Hardware Installation
The software you are installing for this hardware:
MyCompanyName Modem
Has not passed Windows Logo testing to verify its compatibility…
If I call it with INSTALLFLAG_NONINTERACTIVE GetLastError() returns 1168
- ERROR_NOT_FOUND.
Has anyone found a way to suppress this popup?
Other than passing Windows Logo testing…
________________________________
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michael Jones
Sent: Friday, May 20, 2005 6:26 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Modem Installation 2
Thank you Ilya. I looked at the source code for devcon.exe and the
install does most of what you are describing. Note will need to to use
SetupDiRegisterDeviceIno() in the cmds.cpp to install a modem inf.
There you see source that you can copy that can be made to do the steps
Illya describes.
Note the following: This may be too simple but it works.
(1) Attach the modem to the com port.
(2) Make sure the inf file in %systemroot%\inf
(3) rescan for new hardware. Now you can use devcon rescan. Note it
appears you can speed up the rescan by varying the source to devcon with
the rescan an rescan only the devnode and its children you are
interested in.
I hope this in addition helps.
Sincerely;
William Michael Jones “Mike”
“Danail Kirov” wrote in message
news:xxxxx@ntdev…
Hi All,
I’ve recently joined this list and I’ve looked at osr archives
the thread “Modem Installation”. I have exactly the same problem as Wim
Vervoorn.
The last response Michael Jones suggest to look at the devcon
example which I did, but I still can not find how one can automatically
install a modem on a particular COMx port.
I have MyModem.inf describing my modem and I need to able to
setup one or more COM ports to use MyModem.
In NT4 this was possible by writing to a text file
Unattended.txt :
[MyModems]
COMx1 = “MyModemName”
COMx2 = “MyModemName”
And then executing :
“rundll32.exe shell32.dll,Control_RunDLL modem.cpl,Modems,noui
inf=Unattended.txt sect=MyModems”
Could somebody shed some light why this approach is not working
in Win2k3 and what is the proper way to accomplish this?
Regards,
Danail Kirov
Subject: Re: Modem installation
From: “Michael Jones”
Date: Mon, 27 Sep 2004 09:24:29 -0400
(1) Try devcon.exe in the DDK. You have the source code in the
DDK for
devcon.exe also.
Michael Jones
“Mathieu Routhier” wrote in message
news:xxxxx@ntdev…
>
> Instead of manually copying your INF to the INF folder, you
should use
> SetupCopyOEMInf() in PlatformSDK. Refer to the DDK topic
“Copying INFs”
for
> more info.
>
> Mat
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Jones
> Sent: Thursday, September 23, 2004 9:33 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Modem installation
>
> (1) If this is a serial modem that is what serenum.sys is for.
Also the
> source code for serenum.sys is in the DDK.
> (2) Just copy your modem inf to %systemroo%\inf.
> (3) Now go into Device Manager and Select Scan for New
Hardware. Of
course
> the Scan for New Hardware occurs on a reboot too.
>
> Sincerely;
> William Michael Jones
>
>
> “Wim Vervoorn” wrote in message news:xxxxx@ntdev…
> > Hello all,
> >
> > It might be a stupid question but can anyone tell me what is
the easiest
> way
> > to programmatically install a modem driver. (I have an INF
file that
> allows
> > me to do this using the “Add Modem” in control panel but I
would like
to
> be
> > able to do this without the need to start the applet
manually!
> >
> > Best regards,
> >
> > Wim Vervoorn
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com</http:>