
Can I use VBS variable in strCommand of Run method?
You need at least one space after the .exe...
shell.run("C:\Bentley\Program\MicroStation\ustation.exe " & path)
otherwsie you get one big string:
"C:\Bentley\Program\MicroStation\ustation.exe\\Par3\Cad\Drawings\..."
--
Michael Harris
MVP Scripting
I am trying to set up a file path using VBScript variable. Three variables
are passed into the page from another page. These variables are then used
to create the directory/file structure needed to access existing files on
the server. I am using wscript.shell and then shell.run to open the program
into the file. The problem is the shell.run program does not understand the
VBScript variable "path" that I have set up. Does anyone know of a way
around this? Thank you very much for your time.
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)
set shell = CreateObject("wscript.shell")
shell.run("C:\Bentley\Program\MicroStation\ustation.exe" & path)
--
Cedar Vandergon