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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

auto run file error message

Status
Not open for further replies.

doaa

Technical User
Mar 1, 2002
3
EG

Hi all
I used a vb 6 code to open swf (flash file) by its player (SAFlashPlayer.exe)

So I saved vb project to exe file
I executed the exe file (start.exe) and work perfect on HD
This is the code
----------------------------------
Option Explicit
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 x As String
Private y As String
Private location As String
Private file As String
-----------------------------------------------
Private Sub Form_Load()

x = App.Path & "\SAFlashPlayer.exe"
y = App.Path & "\a1.swf"

location = Chr(34) + x + Chr(34)

file = Chr(34) + y + Chr(34)

Unload Me
Shell location + " " + file, vbNormalFocus
-----------------------------------------------------
Then I want to run the start.exe from CD ROM as Auto run file.
I burned all files in the same root and
Tried this in the autorun.inf file.

[autorun]
Open=start.exe

With title project1 The error message appear

Run time error '53'
File not found
***********************
But it work perfect on HD
Please any one can help me
 
Only a long shot, Have you looked at what the App.path is producing. It may be producing a \\ depending whether its comming from the root or a directory. As I say, just off out, it was a guess
 
My experience is that you should never attempt to have a VB program as the AUTORUN program on a CD.
VB programs rely upon the VB/OLE runtimes, and sometimes the presence of specific OCXs.
If the target machine has not had VB or a VB6 app installed, your START.EXE program will not run.

Out of curiosity, why don't you just use

[autorun]
Open=SAFlashPlayer.exe a1.swf

in the autorun.inf?

 
Back to work again
Hi zor first sank you but I am beginner so I do not understand your replay

Hi JeffTullin
I used
[autorun]
Open=SAFlashPlayer.exe a1.swf
But the player opened only
I observed that when I burn all files in folder
By double click on start.exe it work perfect but when burn files in root and double click the same error message appear.
 
i used this code but the same problem
Option Explicit
Private x As String ' the exe name
Private y As String ' The file you want to open

Private Sub Form_Load()

x = App.Path & "\SAFlashPlayer.exe"
y = App.Path & "\a1.swf"

Shell x & " " & y, vbNormalFocus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top