Go Back   PCMech Forums > Windows Support > Windows OS Support (Vista/7/8)

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 10-17-2011, 10:47 AM   #1
Mondsreitersmann
 
Nuclear Krusader's Avatar
 
Join Date: Jul 1999
Location: Skingrad
Posts: 8,781
Question Disabling Auto Run for most devices

Hullo,

I was wondering if there's a way to make a script or a batch file, or something that disables Windows' Auto Run feature for all devices but the optical drives. It'd be great if it worked on all versions of the OS from XP to 7.

Anybody?

TIA
__________________
Darum still, füg' ich mich, wie Gott es will. Nun, so will ich wacker streiten, und sollt' ich den Tod erleiden, stirbt ein braver Reitersmann.
Nuclear Krusader is offline   Reply With Quote
Old 10-17-2011, 01:03 PM   #2
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
Looks like some registry magic is involved:

Enable or disable Autorun (Autoplay) function for specific devices in Windows - Windows Valley
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.
Force Flow is offline   Reply With Quote
Old 10-17-2011, 01:17 PM   #3
Mondsreitersmann
 
Nuclear Krusader's Avatar
 
Join Date: Jul 1999
Location: Skingrad
Posts: 8,781
Is there a way to group all those edits into a single batch file? I know one can add/delete/change registry keys via the command line, all I want is to have one file I can have in my tools USB flash drive that I can just execute on the machines I have to work on.
Nuclear Krusader is offline   Reply With Quote
Old 10-17-2011, 03:13 PM   #4
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
Code:
@echo off
	
    REM create the reg file
	
    (
    ECHO Windows Registry Editor Version 5.00
    ECHO.
    ECHO [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
    ECHO "StatusUpdateInterval"=dword:0000000a
    ECHO "StatusUpdateEnabled"=dword:00000001
    ECHO.
    ECHO.

    ) >> C:\regedit.reg
	
	
    REM execute the reg file
    REGEDIT /S C:\regedit.reg
While this isn't the code you'd use for autorun, this is one technique you'd use for regedits in batch scripts.

Or, if you already have the separate .reg files, use the REGEDIT command to execute them.
Force Flow is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:11 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2