edsager Posted September 27, 2006 Posted September 27, 2006 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
Wooltown Posted September 27, 2006 Posted September 27, 2006 See this linkhttp://www.ezau.com/latest/articles/autorun.shtml
ChrisL Posted September 27, 2006 Posted September 27, 2006 (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 September 27, 2006 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
edsager Posted September 27, 2006 Author Posted September 27, 2006 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now