For Programmers: Free Programming Magazines  


Home > Archive > ASP > June 2005 > re: asp run program using wscript.shell









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author re: asp run program using wscript.shell
bbxrider

2005-06-06, 8:55 pm

for win2k/iis5.0
trying to run a program from my asp program with wscript.shell, see code
below
i can run the program successfully from the command line in the dos window,
so i know it runs ok in that context
i created a virtual directory via iis, giving the directory in question exec
privileges
'f' is not a mapped drive but a logical
the '0' and 'true' are needed to run program without creating a window

the return code is 1 and the program does not run, however there is no
additional error information
in the err.number + err.description.
can't seem to find anything about shell.run return codes
any ideas or suggestions from somebody been down this road?

set shell = server.createobject("wscript.shell")
runexit=shell.Run("""f:\phsData\htmldoc\htmldoc.exe"" --webpage -f
simple.pdf simple.htm",0,true)
if (runexit <> 0) then
response.write "error on htmldoc/ error code = " & runexit & "<BR>"
response.write "htmldoc Error--> " & Err.number & " - " & Err.Description &
"<BR>"
end if


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com