Solved

Script to disable autorun for USB devices for Windows XP

Posted on 2009-03-31
13
3,120 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
 
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
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…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now