Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Script to disable autorun for USB devices for Windows XP

Posted on 2009-03-31
13
Medium Priority
?
3,170 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
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 2000 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
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…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

876 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