Results 1 to 4 of 4

Thread: CD Loader (urgent)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Posts
    229

    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.

  2. #2
    Hyperactive Member CyberSurfer's Avatar
    Join Date
    Aug 2000
    Location
    Old London Town
    Posts
    425
    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]

  3. #3
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    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!


    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Posts
    229

    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
  •  



Click Here to Expand Forum to Full Width