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

Shell problem

Status
Not open for further replies.

Frihi

Programmer
Jun 24, 2001
48
CH
I have a application CDStart.exe to run some exe-files from cd. Now at the end I want to call a Readme.htm which is on the cd.

If I call:
Call Shell("C:\Programme\Internet Explorer\IEXPLORE.exe D:\Readme.htm", 1)

that works.

But as I can't be sure, the cd-driveletter is D, I try:
Call Shell("C:\Programme\Internet Explorer\IEXPLORE.exe App.Path+Readme.htm", 1)

And this makes the App.Path be the Path of the Explorer, settings. How can I put it ob the path of the CDStart.exe?
 
Try:
Call Shell("C:\Programme\Internet Explorer\IEXPLORE.exe " & App.Path & "\Readme.htm", 1)

I hope this helps,
Carlos Paiva
 
Call Shell("C:\Programme\Internet Explorer\IEXPLORE.exe " & App.Path & "\Readme.htm", 1)

Gives:

Runtime error 53: file not found.

Also with:

Call Shell("C:\Programme\Internet Explorer\IEXPLORE.exe " & App.Path & "Readme.htm", 1)
 
The problem is the space in thenInternet explorer path.
Try:
Call Shell("""C:\Programme\Internet Explorer\IEXPLORE.exe"" " & App.Path & "\Readme.htm", 1)

I hope this helps,
Carlos Paiva

 
Thank you, Carlos! Perfect!

But I had to change: "\Readme.htm" to "Readme.htm", because on the cd-drive the App.Path with the slash would be then D:\\Readme.htm.

Man, I have been hanging on that for 2 days now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top