Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Disable/Enable USB Devices in Windows Manager With Script

23 Feb 2015   #1
FUSION CHA0S

Windows 7
 
 
Disable/Enable USB Devices in Windows Manager With Script

My scenario is as is...

We have a ton of companies running windows 2008 (HP ML110G8) servers. These servers have zebra label printers installed on them. We have noticed that these printers will lock up and stop printing until the end user unplugs the device and plugs it back into the computer. It will then print and work fine. As this happens frequently, we need to find an easier way.

On our windows 2003 servers (ML110 G5), we created a devcon batch script that could run when the end user selected it. To my knowledge, devcon is not obtainable without downloading it to a 2008 server.

Is there a simple script i can use to disable a usb device in computer management?

I have looked into WMI, powershell, and other batch files. But it seems like devcon is the only way if i download it. Is there a way to install devcon within the batch file so i can install it to the directory and then run the command all at once?

Im willing to write code, i am not known to devcon


My System SpecsSystem Spec
.
24 Feb 2015   #2
Tookeri

Windows 7 Pro 32
 
 

Hi and welcome to Sevenforums!

DevCon is a stand-alone executable so no install is needed. You can extract it from a WDK(Windows Driver Kit) but make sure you get the correct version for the OS architecture.
http://blogs.technet.com/b/deploymen...evcon-exe.aspx
http://social.technet.microsoft.com/...evcon-exe.aspx

If you download it and then put devcon.exe on a local file server you can have the batch file copy it to a local folder from there, before executing the devcon commands.
My System SpecsSystem Spec
24 Feb 2015   #3
FUSION CHA0S

Windows 7
 
 

I believe this is to download and extract the devcon from the package. This is something we cannot do as we would have to do this for 1500 computers. I am also to believe the changing the value of the usbstor does nothing or unless you have to restart the registry to take affect (which you would need to restart the computer). Is there a known wmi script or a different script that could do what devcon does? i have search endlessly to find anything else but devcon... :/
My System SpecsSystem Spec
.

25 Feb 2015   #4
ShoTTaS

Windows 7 Pro 32bit
 
 

As far as i am thinking this problem goes to the printer spooler. This link i have found may give you more ideas: Print Spooler either Hangs or Crashes due to a Zebra Print Monitor . about the script, you can find batch file codes that works on windows 7 on how to disable/enable the printer spooler on the services.
windows server 2008 has some functions the same as windows 7.
My System SpecsSystem Spec
25 Feb 2015   #5
Tookeri

Windows 7 Pro 32
 
 

What I meant about DevCon is that you first download and extract it. Assuming all computers can use the same DevCon version, you put that devcon.exe on a local server/computer that all other computers have access to. Then the first thing you do in the batch file is to copy devcon.exe from that local server to the local computer that's running the batch file. Next step in the batch file is to run the devcon command. Then distribute the batch file to all computers. When each computer then runs the batch file, devcon will automatically be copied to that computer.

DevCon is the only way I know but hopefully someone else here knows other ways to do this and will drop in to share that knowledge.
My System SpecsSystem Spec
Reply

 Disable/Enable USB Devices in Windows Manager With Script




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
shortcut to enable or disable device in device manager
hi i would like to know i would like to enable or disable a device from device manager without opening device manger is there maybe a script or a shortcut
Hardware & Devices
In windows 7 , IE 11 cannot-enable-or-disable-any add-ons
Fellow W7 users, This is a challenge for anybody who can help me ...nobody could figure it out yet ! In windows 7 , IE 11 I cannot-enable-or-disable-any add-ons via tools , there is a stopsign in front of it. There are no malware or virusses I am the administartor I have re installed...
Browsers & Mail
Internet Explorer Add-ons - Enable or Disable Add-On Manager
How to Enable or Disable Managing Internet Explorer Add-ons This will allow you to enable or disable all or specific users to have the ability to enable or disable Toolbars and Extensions add-ons through the Internet Explorer Add-On Manager in Windows. You must be logged in as an...
Tutorials
Device Manager - Disabled devices re-enable on restart
Using this thread for reference, because it deals with the same issue pretty much, but in a different way. http://www.sevenforums.com/graphic-cards/68199-ati-radeon-hd-3650-pcie-issue.html Since that thread, I have purchased a new computer, and used that graphic card in it. I had the same...
Hardware & Devices
AutoPlay - Enable or Disable for Non-volume Devices
Enable or Disable AutoPlay for Non-volume Devices in Windows 7 and Windows 8 This tutorial will show you how to enable or disable AutoPlay for all non-volume MTP devices like cameras or phones for all or specific users in Windows 7 and Windows 8. You must be logged in as an administrator to...
Tutorials
Device Manager MMC Snap-in - Enable or Disable
How to Enable or Disable the Device Manager MMC Snap-in This will show you how to enable or disable all users on the computer from being able to open and view the Device Manager MMC snap-in window in Vista, Windows 7, and Windows 8. You will need to be logged in as an administrator to be...
Tutorials


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 03:14.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App