Script to disable autorun for USB devices for Windows XP

I need a script either VB or a batch file to disable autorun for USB devices for windows XP.  Your help is much appreciated.
ln733Asked:
Who is Participating?
 
DonNetwork AdministratorCommented:
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
 
Justin_W_ChandlerCommented:
USB devices don't use autorun :)
0
 
johnb6767Commented:
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
ln733Author Commented:
I am looking to disable USB keys.  If possible.....I would like to still have ipod and memory card functionality.
0
 
Justin_W_ChandlerCommented:
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
 
ln733Author Commented:
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
 
Justin_W_ChandlerCommented:
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
 
ln733Author Commented:
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
 
johnb6767Commented:
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
 
johnb6767Commented:
Standby.....
0
 
johnb6767Commented:
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
 
esa_esa_2000Commented:
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
 
DonNetwork AdministratorCommented:
What????
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.

All Courses

From novice to tech pro — start learning today.