All

Using Windows Server 2003 and able to enumerate all devices through WMI
script, however I am stumped as to how I can disable a device through a
scripting interface. ie same functionality as through Opening Device
Manager, selecting device, right click, select disable.

I have used devcon previously when I have needed this functionality within
XP and 2K machines, but hoping that new functionality has been exposed
within 2K3 ?

Any ideas ?

Cheers

Sean

RE: Disable a Device through Script by v-garych

v-garych
Thu Aug 19 01:56:52 CDT 2004

Hi Sean,

> I have used devcon previously when I have needed this functionality
within XP and 2K machines, but hoping that new functionality has been
exposed within 2K3 ?
>

The devcon.exe also works under Windows Server 2003...


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------


Re: Disable a Device through Script by Sean

Sean
Thu Aug 19 04:20:58 CDT 2004

Gary

Based on that response Im taking it its not possible to disable devices
through WMI functionality ?

Cheers


""Gary Chang"" <v-garych@online.microsoft.com> wrote in message
news:Hw1b6mbhEHA.2632@cpmsftngxa10.phx.gbl...
> Hi Sean,
>
>> I have used devcon previously when I have needed this functionality
> within XP and 2K machines, but hoping that new functionality has been
> exposed within 2K3 ?
>>
>
> The devcon.exe also works under Windows Server 2003...
>
>
> Thanks!
>
> Best regards,
>
> Gary Chang
> Microsoft Online Partner Support
>
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> --------------------
>



Re: Disable a Device through Script by v-garych

v-garych
Thu Aug 19 20:42:55 CDT 2004

Hi Sean,

> Based on that response Im taking it its not possible to disable devices
through WMI functionality ?
>

yes, you could not disable a device by using WMI and VBScript.

However, you can do it by using the devcon.exe utility in a script, such
as:
Set objShell = WScript.CreateObject("WScript.Shell")
Set objExecObject = objShell.Exec("cmd /c devcon disable *MSLOOP")


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------