Total noobie here, so spoon feed and speak slowly (and with code bytes) please.
What I am trying to accomplish is a VB6 .exe menu program that will be set to autostart on a info CD. If you click on a button on the menu it will open a file from the CD. Easier said than done. The problem I ran into right off is Adobe Reader versions, directory differences, drive letter differences, etc...
So I need the .exe to work without having to call anything by specific drive letter (C:\Program Files\Adobe\Rea der 9.0\Reader\Acro Rd32.exe is a perfect example. what if its a different version, location, drive)
So far I seem to have the AcroRd32.exe problem solved (many thanks to bytes forum posters, all of you), but am still hung up on calling up the actual .pdf file without using drive letters.
This is what I have so far:
Private Declare Function ShellExecute Lib "shell32.dl l" Alias "ShellExecu teA" (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 Command1_Click( )
ShellExecute 0&, "OPEN", "X:\Files\broch ure.pdf", "", "", 1
End Sub
This works well so far, but still relies on a drive letter.
The .exe file would be placed on X:\ following the above example, and the supporting files (brochure.pdf in this case) would be in a hidden subfolder X:\Files\
Any input is greatly appreciated.
What I am trying to accomplish is a VB6 .exe menu program that will be set to autostart on a info CD. If you click on a button on the menu it will open a file from the CD. Easier said than done. The problem I ran into right off is Adobe Reader versions, directory differences, drive letter differences, etc...
So I need the .exe to work without having to call anything by specific drive letter (C:\Program Files\Adobe\Rea der 9.0\Reader\Acro Rd32.exe is a perfect example. what if its a different version, location, drive)
So far I seem to have the AcroRd32.exe problem solved (many thanks to bytes forum posters, all of you), but am still hung up on calling up the actual .pdf file without using drive letters.
This is what I have so far:
Private Declare Function ShellExecute Lib "shell32.dl l" Alias "ShellExecu teA" (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 Command1_Click( )
ShellExecute 0&, "OPEN", "X:\Files\broch ure.pdf", "", "", 1
End Sub
This works well so far, but still relies on a drive letter.
The .exe file would be placed on X:\ following the above example, and the supporting files (brochure.pdf in this case) would be in a hidden subfolder X:\Files\
Any input is greatly appreciated.
Comment