|
-
Jun 13th, 2000, 06:54 AM
#1
Thread Starter
New Member
Hello out there.
Question on how to get my Excel-based app to run immediately on putting the CD in the drive.
I gather from the MSDN knowledge base that I have to use 'ShellExecuteEx' in my autorun.inf file on the CD to automatically open Excel and my file, but I'm having a lot of trouble understanding the syntax.
Can anyone provide a concrete example of what the actual code would look like to run this? This is what MSDN shows:
***
BOOL ShellExecuteEx(
LPSHELLEXECUTEINFO lpExecInfo
);
Parameters
lpExecInfo
Address of a SHELLEXECUTEINFO structure that contains and receives information about the application being executed.
***
But I have no idea what to do about "SHELLEXECUTEINFO".
Damn! Stranded!
-
Jun 14th, 2000, 04:52 AM
#2
New Member
if I understand correctly you want to launch a *.xls file in your CD-ROM when you insert the CD. This might not be the best way but it works...the user might need to have vb6000.dll, which is not included in W95/NT4 I believe.
creat an excutable (run.exe) from this code:
--------------------------------------------------
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 Sub Form_Load()
Call ShellExecute(0&, vbNullString, "c:\testingit\excel.xls", vbNullString, vbNullString, vbNormalFocus)
Unload Me
End Sub
---------------------------------------------------
Now in your autorun.inf place this as your first line
-----------------------------------------------------
open=run.exe
hope this helps...all files must be in the root dir...unless otherwise specied by "open=dir\exec"
-
Jun 16th, 2000, 05:06 AM
#3
Frenzied Member
ok, from what's above, I found out that Mark is talking about C++, or Java, and the other person, is talking about Visual Basic
-
Jun 18th, 2000, 03:42 PM
#4
Frenzied Member
I'm not talking about C++ or Java
http://msdn.microsoft.com/library/ps...oplay_cmds.htm is a list of commands you can use in autorun.inf files
Simple as that!
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
|