?
Solved

Build an executable file for autorun.inf

Posted on 1999-11-11
3
Medium Priority
?
176 Views
Last Modified: 2013-12-25
How do I build an executable file to open an .html file to be placed on a CD?

I think it can be done with Visual Basic and I understand autorun.inf must point to an .exe
0
Comment
Question by:MommaCrab
3 Comments
 
LVL 12

Expert Comment

by:mark2150
ID: 2202798
You'll have a *tiny* VB program that performs a ShellExecute command to fire the default web browser and the param to the ShellExecute will be the name of the web page.

M
0
 
LVL 4

Accepted Solution

by:
nutwiss earned 100 total points
ID: 2207713
Personally I would do it in Delphi (or at least C++) because it may be a chore to guarantee that the user has a full copy of the necessary VB run-time files to execute a VB app...

however, this simple sub should do the job (assuming the EXE and the .htm file are in the root folder):

Put this in a Module (.Bas file) remove ALL forms from the project.

'##############################

Option Explicit
Private Const SW_SHOWMAXIMIZED = 3
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

Sub Main()
ShellExecute 0, vbNullString, App.Path & "\Default.htm", "", App.Path, SW_SHOWMAXIMIZED
End Sub

'##############################

if you compile this specifying 'Unattended execution' this will compile to < 8Kb

0
 
LVL 5

Expert Comment

by:KDivad
ID: 2238635
Echo?
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

592 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question