Jump to content

Recommended Posts

Posted

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:

[Autorun]

open=AutoRunNow.exe

ICON=LogoLogo.ico

[AutoRunNow]

Run=index.html

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

Any help?

Thanks,

edsager

:)

Posted (edited)

This might work give it a try

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

[AutoRun]

open=Autorun.exe "myhtmlfile.html"

icon=myIcon.ico

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

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

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
Posted

Hello,

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,

edsager

:)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...