Jump to content
Sign in to follow this  

AutoRun exe?

Recommended Posts

Hello All,

I have searched and searched and I cannot figure out what to include in the .exe which is called on an autorun CD. I understand the .inf file and the calling of an executable, but what goes in the executable?

I am trying to have an html file (index.html) open when the CD is inserted.

The .inf file has the following:






For whatever frustrating reason, I cannot figure out what code should go in the AutoRunNow.exe.

Any help?




Share this post

Link to post
Share on other sites

This might work give it a try

Create an inf file called Autorun.inf with the following text


open=Autorun.exe "myhtmlfile.html"


Then create a compiled AutoIT executable called AutoRun.exe with the following code

If $CMDLINE [0] > 0 then
    Run(@ComSpec & ' /C ' & $CMDLINE[1], @scriptdir, @sw_hide)  

Chuck both the exe and the inf and the html file on the root of the cd and give it a try

*edit* I just tried this and burned a Cd and it does work!

Edited by ChrisL

Share this post

Link to post
Share on other sites


Wooltown: Thank you for that link. I do have that executable already, but I wanted to do something on my own using AutoIt so that no copyright issues occur.

ChrisL: Thank you for the code. It works great and is exactly for what I was looking.

All is good now.

Thanks to both of you,



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...