Please Help!!! shell.run problems! 
Author Message
 Please Help!!! shell.run problems!

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



Mon, 30 Dec 2002 03:00:00 GMT  
 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



Mon, 30 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

2. Problems running shell app HELP!!

3. DOS Shell Problem -- Please Help

4. Shell / GetModuleUsage Problem - Please HELP!!!!

5. PLEASE HELP PLEASE HELP PLEASE HELP

6. difference between Shell.run and Shell.exec

7. Can anyone HELP me PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE

8. Scripting problem using Shell method to run ICQ

9. Problem running WScript.Shell from asp

10. Problem running VBS from script shell

11. Shell.Run under IIS Problems

12. Problem with registering IE 5.0 Shell CTRL and running WSH

 

 
Powered by phpBB® Forum Software