Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating and autorun.inf for a CD-ROM 1

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
If I want to open an HTML document when they insert my CD what do I have to put in the autorun.inf???

this does not work.

[autorun]
open=index.html

TIA


DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Make a little exe then runs something like

Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

form_load()
retval = ShellExecute(Form1.hWnd, "open", app.path & "index.html", "", "C:\Project\", _
SW_RESTORE)
unload me
end sub
Brad,
Hey! email me any time! Bradsvb@yahoo.com
 
OOOO, change "C:\project\" to app.path.


Did this work for u? Brad,
Hey! email me any time! Bradsvb@yahoo.com
 
Yep works perfect !!!!!
How 'bout a star !!!

I had to add one tiny thing
and changed one parameter as shown in RED below

Private Sub Form_Load()
retval = ShellExecute(Form1.hwnd, "open", App.Path & "\index.html", "", "", SW_RESTORE)

Unload Me

End Sub
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
One more question

What kind of file Installation package do I create so I can copy all the necesaary files to the CD-ROM.
When the autorun.inf launches my new little VB program will run and not give errors like missing xxxxxx.dll
All of those files need to reside on the CD-ROM somewhere
Preferably in a folder so it looks clean....
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
The only way I know of is to either buy this


I don't know if the trail places any nag screens though. I'm not sure but there could be other ways. I know of anothe cheaper program but I'm still looking for it. I'll tell you of any better solutions I find.

I KNOW there a way.




Brad,
Hey! email me any time! Bradsvb@yahoo.com
 
hmmm... I checked out some of the Microsoft CD's that auto pop up html docs. They use a small shelling program called shelexec.exe. Since you probably can't legally use theirs, you could easilly create your own in a C or C++ compiler and get rid of the VB overhead.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top