TIA
CP
Perform & maint
system
hardware
add hardware wizard
and I have only had it 2 days
James
"Stephane Barizien" <NOSP...@ocegr.fr> wrote in message
news:eUfFq8jXBHA.1792@tkmsftngp07...
"James West" <james...@ss.gov> wrote in message
news:eSd$clnXBHA.1496@tkmsftngp05...
if that does not the trick just try this
mmc c:\winnt\system32\devmgmt.msc
if your win2k is in your C drive and your win2k directory
is winnt and so on ....
J-F
>-----Original Message-----
>Is there one? On XP? On W2K?
>
>TIA
>
>
>
>.
>
--------------------------------------------------
DEVCON: COMMAND-LINE UTILITY
SIMILAR TO DEVICE MANAGER
--------------------------------------------------
The DevCon utility is a command-line utility that acts as an alternative to
Device Manager. It allows individual devices or groups of devices to be
enabled,
disabled, restarted, updated, removed, and queried. DevCon provides
information
relevant to the developer that is not available in Device Manager.
DevCon has been designed for use on Windows XP and Windows 2000. It will not
work on Windows 95, Windows 98, or Windows Millennium Edition.
DevCon is available as a debugging and development tool. It can be freely
modified for private use. The source code and documentation for DevCon can
be
found in the Windows XP DDK under %DDKroot%\Src\Setup\Devcon. The sample
demonstrates how to use the SetupAPI and CfgMgr32 APIs together effectively
to
enumerate devices and perform device operations.
Note: The DevCon utility may not be redistributed.
Detailed information and a link to the DevCon.exe file are available in
Knowledge Base at:
http://support.microsoft.com/support/kb/articles/q311/2/72.asp
"Stephane Barizien" <NOSP...@ocegr.fr> wrote in message
news:u3Hphf1lBHA.2024@tkmsftngp03...
>
> "J-F" <jfve...@hotmail.com> wrote in message
> news:077b01c177a9$51a6d170$3bef2ecf@TKMSFTNGXA10...
> > In win2k just type :
> > devmgmt.msc
> >
> > if that does not the trick just try this
> > mmc c:\winnt\system32\devmgmt.msc
> >
> > if your win2k is in your C drive and your win2k directory
> > is winnt and so on ....
>
> Thx for the tip; however that launches Device Manager, but does not AFAIK
> initiate a scan.
>
> In the meantime I've found a code snippet in MSDN that does the trick
once
> turned into a command-line program (Note: W2K/XP DDK needed to compile
> this):
>
> #include <windows.h>
> #include <cfgmgr32.h>
> #include <stdio.h>
>
> BOOL ScanForHardwareChanges()
> {
> DEVINST devInst;
> CONFIGRET status;
>
> //
> // Get the root devnode.
> //
>
> status = CM_Locate_DevNode(&devInst, NULL, CM_LOCATE_DEVNODE_NORMAL);
>
> if (status != CR_SUCCESS) {
> printf("CM_Locate_DevNode failed: %x\n", status);
> return FALSE;
>
> }
>
> status = CM_Reenumerate_DevNode(devInst, 0);
>
> if (status != CR_SUCCESS) {
> printf("CM_Reenumerate_DevNode failed: %x\n", status);
> return FALSE;
> }
>
> return TRUE;
> }
>
> int main(int argc, char *argv[])
> {
> if (ScanForHardwareChanges())
> return 0;
> else
> return 1;