|
-
Sep 12th, 2000, 05:22 AM
#1
Thread Starter
Addicted Member
Dear all,
Does anyone know how to create a start-up program
(single exe without the need of dlls) that can
call a htm document.
Example:
Startup.exe (no dll needed)
I need this program to load a htm page on CD rom
as a startup.
Thanks in advance
ps: pls send me a source code if possible in any languages.
-
Sep 12th, 2000, 05:32 AM
#2
Hyperactive Member
You need to create an MSDOS Batch file that will open the HTML file, and then a file called autorun.inf to automatically open the batch file. I'm not sure of the correct syntax, but if you chack out autorun.inf on any autorunning CD you have, it should help.
[Edited by CyberSurfer on 09-12-2000 at 06:51 AM]
-
Sep 12th, 2000, 05:48 AM
#3
Try this then...
Code:
'shove this under form_declarations...
Private 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
Private Const SW_SHOWNORMAL = 1
Private Sub Form_Load()
Call ShellExecute(0&, vbNullString, "D:\YOUR_HTML_FILE_HERE.htm", vbNullString, "C:\", SW_SHOWNORMAL)
End Sub
Ok, this will make your exe file open IE & open your html file. If you want this to run when you place the CD in the cd rom drive, try the following (bearing in mind I saved the above as Start.exe and my CD-rom is D:
- Start the windows notepad
- Now type the following :
[autorun]
open=Start.exe
icon=Start.exe, 1
- Now save this file as AUTORUN.INF
- place under the D: drive (not in subfolder)
Hope this helps! 
-
Sep 12th, 2000, 07:57 AM
#4
Thread Starter
Addicted Member
thanks for all the replies, but if i use VB can i juz
create one exe without the need of dlls ? 'cos in vb
we need to create a distribution package in order for
our exe to run.
any suggestion ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|