If NoAutoRun.reg doesn’t work, you may need space

Dennis o'reilly
By Dennis O’Reilly

The way word-wrapping alters line breaks in some browser windows thwarted a few of our readers’ attempts to disable AutoRun.

If you manually typed a line break where the code requires a space, and you couldn’t get the file to work, a simple change will do the trick.

Windows Secrets contributing editor Woody Leonhard authored a Jan. 22 Top Story on the Conficker/Downadup worm and included a link to a Nov. 8, 2007, article.

That article, by associate editor Scott Dunn, explained how to add a Registry key to block Windows’ AutoRun function. After you do this, if you unknowingly insert a hacked CD, DVD, USB drive, or other external drive, it won’t automatically infect your PC. The technique involves copying and pasting three lines of code into a NoAutoRun.reg file, then right-clicking the file, merging it into the Registry, and rebooting.

One of the lines of code is very long and looks as follows (it’s all one line, but it word-wraps to two lines in small windows):

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionIniFileMappingAutorun.inf

Reader Rob Oppenheim wasn’t the only reader who found that merging into the Registry the file he created had no effect, because he’d entered a line break where his e-mail program had word-wrapped that line:

  • “In your [most recent] newsletter, you refer to a Web page that describes how to disable autoruns. The page describes a .reg file with a key that displays broken across two lines (at least on my machine it displays that way). Unfortunately, it’s not obvious that there’s a space in the key; that is, it should be ‘Windows NT’ and not ‘WindowsNT.’

    This article is part of our premium content. Join Now.

    Already a paid subscriber? Click here to login.

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 10, Windows 8, Windows 7, Firefox, Internet Explorer, Google, etc. Join our 460,000 subscribers!

    Enter your email above to receive messages about offerings by Penton, its brands, affiliates and/or third-party partners, consistent with Penton's Privacy Policy.
    The Windows 7, Vol 3 (Excerpt)

    Subscribe and get our monthly bonuses - free!

    The Windows 7 Guide, Volume 3: Advanced maintenance and troubleshooting provides advanced tools for keeping Microsoft's premier operating system up and running smoothly. Get this excerpt and other 4 bonuses if you subscribe FREE now!

= Paid content

All Windows Secrets articles posted on 2009-02-05: