Link to home
Start Free TrialLog in
Avatar of amcstephen
amcstephen

asked on

Launch an EXE file that is on a CD-ROM from an HTA Application that is on the same CD-ROM

Hi!

I am trying to launch an EXE file (Director.exe) from my HTA Application - "Default.hta" (which is on the same CD-ROM). I am using the following WSH code:

---------------------------

<script language="VBScript">
Dim objShell
Sub Run(Name)
  Set objShell = CreateObject("WScript.Shell")
  objShell.Run Name
  On Error Resume Next
  Set objShell = Nothing  
End Sub
</script>

<!-- Launch File -->
<font onClick="javascript:Run('Director.exe');" style="cursor: hand;"><u>Run Macromedia Director File</u></font>

----------------------------------

If I place the Director.exe file on the hard drive and Javascript link to "C:/Director.exe" The program runs fine. But when I try to link to it on the CD-ROM (as in the above example) I get the following error:

ERROR: The System cannot find the file specified
CODE: 0
URL: File://E:\default.hta

Any thoughts??

AMCStephen
ASKER CERTIFIED SOLUTION
Avatar of Zontar
Zontar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of seanpowell
seanpowell
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial