• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 390
  • Last Modified:

VB Script to disable a device in device manager XP

Does anyone know if it is possible to use just a vb script to disable a device in device manager on Win XP SP2? If so, do you have a sample to put me on the path? -Thanks
0
Willing2Learn_More
Asked:
Willing2Learn_More
  • 2
  • 2
1 Solution
 
RobSampsonCommented:
To my knowledge, there are no WMI classes that support a similar function to the Device Manager.  You will need to use devcon:
http://support.microsoft.com/kb/311272

For example, with devcon.exe copied to your System32 folder, you could run this VBScript:
strCommand = "cmd /c devcon disable *MSLOOP"
Set objShell = CreateObject("WScript.Shell")
objShell.Run strCommand, 0, True

Open in new window


Regards,

Rob.
0
 
expert20Commented:
0
 
Willing2Learn_MoreAuthor Commented:
With the VB script and the devcon.exe download from MS I was able to make a package and pushed it out to the systems with success. Thanks!!!..and thanks to all that responded. You guys all rock.
0
 
RobSampsonCommented:
Great.  Thanks for the grade.

Rob.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now