I have a simple script to display an image file passed as a parameter using internet explorer. It works great with iexplore.exe in C:\.
The same script pointing to the standard location of iexplore.exe
in Program Files/internet explorer/ does not work. I get the error "Line 18, char 1. the system cannot find the file specified". I don't have a clue why.
Dazed and confused.
Remember.. 'Depression is just anger without enthusiasum'.
Code:
Option Explicit
Dim MyParam1
Dim ObjShell
Dim RunIt
If Wscript.Arguments.Count <> 1 Then
Wscript.echo "Incorrect Parameters. One required."
Else
MyParam1 = Wscript.Arguments.Item(0)
Wscript.Echo "Params: " & MyParam1
End If
Set objShell = CreateObject("WScript.Shell")
RunIt = "iexplore.exe " & MyParam1
Wscript.Echo Runit
objShell.Run Runit
The same script pointing to the standard location of iexplore.exe
in Program Files/internet explorer/ does not work. I get the error "Line 18, char 1. the system cannot find the file specified". I don't have a clue why.
Code:
Option Explicit
Dim MyParam1
Dim ObjShell
Dim RunIt
If Wscript.Arguments.Count <> 1 Then
Wscript.echo "Incorrect Parameters. One required."
Else
MyParam1 = Wscript.Arguments.Item(0)
Wscript.Echo "Params: " & MyParam1
End If
Set objShell = CreateObject("WScript.Shell")
RunIt = "C:\Program Files\Internet Explorer\iexplore.exe " & MyParam1
Wscript.Echo Runit
objShell.Run Runit
Dazed and confused.
Remember.. 'Depression is just anger without enthusiasum'.