
Please Help!!! shell.run problems!
Please don't post the same question more than once with different subject lines...
--
Michael Harris
MVP Scripting
Hello,
I am having problems launching a cad program into a specified file. I pass
in three variables from another page to the page with the VBScript (HTML
page). I set up the path according to the variables and when I do
"document.write(path)" it displayes the correct path. The problem is in
shell.run the variable "path" is not understood. My code is listed below.
Does anyone know how to get this to work? Thank you for any input you may
have.
Dim obj, shell, path, temp1, temp2, suff
temp1 = "#t1#"
temp2 = "#t2#"
suff = "#s123#"
path = "\\Par3\Cad\Drawings\"
path = path & temp1
path = path & "\"
path = path & temp2
path = path & suff
path = path & "01.dgn"
document.write(path) ' This
outputs"\\Par3\Cad\Drawings\1234\5678a01.dgn"
set shell = CreateObject("wscript.shell")
shell.run("C:\Bentley\Program\MicroStation\ustation.exe" & path)
If I hard code the number, the line of code below successfully launches the
cad program into the correct drawing.
shell.run"""C:\Bentley\Program\MicroStation\ustation.exe""
\\Par3\Cad\Drawings\1234\5678a01.dgn"""
--
Cedar Vandergon