?
Solved

VB Script to disable a device in device manager XP

Posted on 2011-09-15
5
Medium Priority
?
373 Views
Last Modified: 2012-05-12
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
Comment
Question by:Willing2Learn_More
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 65

Accepted Solution

by:
RobSampson earned 2000 total points
ID: 36546865
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
 
LVL 1

Expert Comment

by:expert20
ID: 36550124
0
 

Author Closing Comment

by:Willing2Learn_More
ID: 36565010
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
 
LVL 65

Expert Comment

by:RobSampson
ID: 36565064
Great.  Thanks for the grade.

Rob.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month12 days, 15 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question