How to "autorun" executables from a CD/DVD on Windows 7

10,085

Security built into Windows 7 prevents autorun from running.

(The reason why it won't work is becasuse on Windows 7, the only keys available in the [autorun] section of autorun.inf are label and icon (except for on DRIVE_CDROM drives). Any other keys in this section will be ignored. Thus only CD and DVD media types can specify an AutoRun task (or affect double-click and right-click behavior).

There is a patch available, KB971029 for Windows XP and later, that will change AutoRun functionality to this behaviour.)

Share:
10,085

Related videos on Youtube

JohnnyFromBF
Author by

JohnnyFromBF

Updated on September 18, 2022

Comments

  • JohnnyFromBF
    JohnnyFromBF almost 2 years

    Possible Duplicate:
    How can I Create Autorun DVD?

    I want my software to run automatically from a CD/DVD with no user interaction whenever the user puts the CD/DVD into the drive. As far as I know autorun should still work with Windows 7, just not for USB drives.

    But how?

    Let's say I want to start software.exe, how do I configure autorun.inf ? This, doesn't work.

    [AutoRun]
    open=software.exe
    

    What is preventing software.exe* from running? How can I run it (automatically)?

    • Ƭᴇcʜιᴇ007
      Ƭᴇcʜιᴇ007 over 12 years
      possible duplicate of How can I Create Autorun DVD? - Specifically see This Answer for some help.
    • Dave M
      Dave M over 12 years
      Also note that many companies disable autorun as an added layer of defense against malware.
    • Ƭᴇcʜιᴇ007
      Ƭᴇcʜιᴇ007 over 12 years
      BTW: Ensure you haven't disabled AutoRun on your test computer. And although I'm not 100%, I think the section header is case sensitive, as all examples tend to show it as [autorun] and not [AutoRun].
  • JohnnyFromBF
    JohnnyFromBF over 12 years
    Ok, so what do I have to put in the autorun.inf in order to start xy.exe automatically?
  • Dennis
    Dennis over 12 years
    @wizlog: I think you got a few things wrong here. 1. The OP specifically asks for a solution for optical drives, which - as you said yourself - should still work on Windows 7. 2. The patch is intended for Windows XP, Vista and Server 2003 in order to behave like Windows 7 does. You cannot install this patch on Windows 7 nor would it do any good.
  • Ian Boyd
    Ian Boyd over 12 years
    Just to answer the question directly: "What is preventing software.exe from running?" Answer: Security
  • JohnnyFromBF
    JohnnyFromBF over 12 years
    @Dennis Thats right, I'm now wondering if it's possible to autorun an .exe on a CD on Windows 7 after all? That has not been answered so far.