Solved

Script to disable autorun for USB devices for Windows XP

Posted on 2009-03-31
13
3,135 Views
Last Modified: 2012-05-06
I need a script either VB or a batch file to disable autorun for USB devices for windows XP.  Your help is much appreciated.
0
Comment
Question by:ln733
[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
  • 4
  • 3
  • 3
  • +2
13 Comments
 
LVL 6

Expert Comment

by:Justin_W_Chandler
ID: 24030138
USB devices don't use autorun :)
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 24030214
USB Thumb Drives, cameras, phones w/ memory cards, ipods in "Disk Mode" certainly do use Autorun....

What USB devices are you referring to SPECIFICALLY?
0
 

Author Comment

by:ln733
ID: 24030656
I am looking to disable USB keys.  If possible.....I would like to still have ipod and memory card functionality.
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 6

Expert Comment

by:Justin_W_Chandler
ID: 24030839
nod@johnb6767 I assumed he was talking about thumbdrives (or whatever you want to call them). It turns out I may have been right... USB keys = thumbdrives?

ln733: Use Symantec Protection Agent
0
 

Author Comment

by:ln733
ID: 24030881
Has to be a script.  We unfortunately don't have the budget to implement a enterprise application to restrict users from using usb thumbdrives.
0
 
LVL 6

Expert Comment

by:Justin_W_Chandler
ID: 24030947
I'm afraid that if you allow ipod and memory card functionality, you're effectively negating the security benefit of disabling thumb drives... With that said, perhaps the most appropriate solution is also the easiest. Just remove the drivers associated with thumb drives.
0
 

Author Comment

by:ln733
ID: 24031000
Ok....We don't entirely want to disable the thumb drive.  We just want to turn off autorun.  All USB devises such as USB Thumbdrives, Ipods, and etc.  Except for CD and DVDs.

0
 
LVL 66

Expert Comment

by:johnb6767
ID: 24031003
Disable USB Disks with GPO
http://www.petri.co.il/disable_usb_disks_with_gpo.htm

HOWTO: Use Group Policy to disable USB, CD-ROM, Floppy Disk and LS ...
http://support.microsoft.com/kb/555324

Nothing needed to purchase..... If this cant be done by GPO in YOUR environment, then we can look at a .reg script to run in your logon script perhaps?
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 24031038
Standby.....
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 24031082
How to disable the Autorun functionality in Windows
http://support.microsoft.com/kb/967715/

See if this GPO method might help, if you have the appropriate HF installed.....
0
 
LVL 47

Accepted Solution

by:
Donald Stewart earned 500 total points
ID: 24032534
I like this best

Advanced Autorun / Autoplay settings ADM file

Use the adm below


; Advanced Autorun settings (AdvancedAutorun.adm)
; See http://support.microsoft.com/kb/953252 for details
 
CLASS MACHINE
 
CATEGORY !!AdvancedAutorun
	POLICY !!AutorunAdvanced
		KEYNAME "Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"
 
		PART !!Autorun_Box          DROPDOWNLIST REQUIRED
			VALUENAME "NoDriveTypeAutorun"
			ITEMLIST
				NAME !!Autorun_Default		VALUE NUMERIC 145 ; 0x91
				NAME !!Autorun_NoRemovable	VALUE NUMERIC 149 ; 0x95
				NAME !!Autorun_NoFixed		VALUE NUMERIC 153 ; 0x99
				NAME !!Autorun_NoRemovableFixed	VALUE NUMERIC 157 ; 0x9D
				NAME !!Autorun_NoCD		VALUE NUMERIC 177 ; 0xB1
				NAME !!Autorun_NoRemovableCD 	VALUE NUMERIC 181 ; 0xB5
				NAME !!Autorun_NoFixedCD	VALUE NUMERIC 185 ; 0xB9
				NAME !!Autorun_None		VALUE NUMERIC 255 DEFAULT ; 0xFF
			END ITEMLIST
		END PART
		PART !!Autorun_Text1	TEXT
		END PART
		PART !!Autorun_Text2	TEXT
		END PART
	END POLICY
END CATEGORY
 
CLASS USER
 
CATEGORY !!AdvancedAutorun
	POLICY !!AutorunAdvanced
		KEYNAME "Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"
 
		PART !!Autorun_Box          DROPDOWNLIST REQUIRED
			VALUENAME "NoDriveTypeAutorun"
			ITEMLIST
				NAME !!Autorun_Default		VALUE NUMERIC 145 ; 0x91
				NAME !!Autorun_NoRemovable	VALUE NUMERIC 149 ; 0x95
				NAME !!Autorun_NoFixed		VALUE NUMERIC 153 ; 0x99
				NAME !!Autorun_NoRemovableFixed	VALUE NUMERIC 157 ; 0x9D
				NAME !!Autorun_NoCD		VALUE NUMERIC 177 ; 0xB1
				NAME !!Autorun_NoRemovableCD 	VALUE NUMERIC 181 ; 0xB5
				NAME !!Autorun_NoFixedCD	VALUE NUMERIC 185 ; 0xB9
				NAME !!Autorun_None		VALUE NUMERIC 255 DEFAULT ; 0xFF
			END ITEMLIST
		END PART
		PART !!Autorun_Text1	TEXT
		END PART
		PART !!Autorun_Text2	TEXT
		END PART
	END POLICY
END CATEGORY
 
[strings]
AdvancedAutorun="Advanced Autorun Settings"
Autorun_Box="Turn off Autoplay on:"
Autorun_Default="No drives (XP/Vista default)"
Autorun_NoRemovable="Removable drives"
Autorun_NoFixed="Fixed drives"
Autorun_NoRemovableFixed="Removable, Fixed drives"
Autorun_NoCD="CD-ROM drives"
Autorun_NoRemovableCD="CD-ROM, Removable drives"
Autorun_NoFixedCD="CD-ROM, Fixed drives"
Autorun_None="All drives (including RAM drives)"
AutorunAdvanced="Turn off Autoplay (advanced)"
Autorun_Text1="Windows XP and Vista disable Network and Unknown drives by default"
Autorun_Text2="Windows 2000 and Server 2K3 also disable Removable drives by default"

Open in new window

0
 
LVL 2

Expert Comment

by:esa_esa_2000
ID: 24554794
Use this vaccine from Panda security , it is free to use it will protect your usb device from beeing infected  by putting its autorun files by way it will be unoverwritable by viruses will keeping windows autorun function working as before asking you what you want when you insert your usb device
i tried it surely i can but my usb stick in infected computers my usb never infected by autorun
by the way  usb autorun vireses have 2 components
1- the virus itself
2-autorun file executed by windows(this wat will be vaccined) used by virus maker to load the virus(1) into your PC
0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 24555858
What????
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Chocolatey under PowerShell is not working properly 3 95
Windows updates batch files 7 234
No IP Address Assigned to VM 10 159
Can't get the script to continue.... 8 43
The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

751 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