473,326 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

asp running program with wscript.shell

for win2k adv server/iis5.0
trying to run an external program from my asp routine that has multiple
parameters, see following

set shell = server.createobject("wscript.shell")
shell.Run """f:\phsData\htmldoc\htmldoc.exe"" --webpage -f phsnew.pdf
phsnew.htm"

program either doesn't get invoked, or has an error, but since it has no
error log i can't check that,
so not sure why not getting a result
i have run the program successfully from the command line in that directory,
so know it can be run in
the first place and the asp program creates and writes files in the same
directory so i don't think its a
permission problem. asp doesn't complain with any errors

so i'm stumped here and was hoping somebody can give an idea to check or
something
Jul 22 '05 #1
2 7434
First, I would be very suspicious of the use of « F:\ » if it is a mapped
drive. Mapped drives are associated with a logon and will not be visible
from inside the ASP process and should be replaced with an UNC name.

Second, here a sample of the code that I'm using myself for running a
program with multiple parameters:

on error resume next
Application.Lock

CodeExit = wshShell.run ("""C:\Eval\EvEngine\RCTEvalTest.exe""
C:\EVAL\EvEngine assumption " & NomFichier & " " & NomFichierA, 0, true)

Application.UnLock
on error goto 0

If (CodeExit <> 0) Then
Response.Write "A nice error message goes here --"
end if

I don't remember the signification of the two parameters 0 and True that I
have put at the end of the call to Run() but maybe they are related to your
problem.

Another possibility would be to try running a .BAT file instead.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF
"bbxrider" <bx******@comcast.net> wrote in message
news:OM*************@TK2MSFTNGP15.phx.gbl...
for win2k adv server/iis5.0
trying to run an external program from my asp routine that has multiple
parameters, see following

set shell = server.createobject("wscript.shell")
shell.Run """f:\phsData\htmldoc\htmldoc.exe"" --webpage -f phsnew.pdf
phsnew.htm"

program either doesn't get invoked, or has an error, but since it has no
error log i can't check that,
so not sure why not getting a result
i have run the program successfully from the command line in that
directory,
so know it can be run in
the first place and the asp program creates and writes files in the same
directory so i don't think its a
permission problem. asp doesn't complain with any errors

so i'm stumped here and was hoping somebody can give an idea to check or
something

Jul 22 '05 #2
thanks for reply
still not working, 'f' is not mapped, its logical, and i created a virtual
directory under iis, for the program directory, with exec privileges, so it
should have the necessary run permissionss.
i'm getting an error return code of 1 but not sure its telling anything
other than did not run
at this point i'm guessing its a command window problem, where its trying to
open a command line window but its not allowed when running asp files under
iis5.0 the '0' at end of parms is supposed to 'hide the window and activate
another window', i think its the 'another window' maybe the problem,
unfortunately all the other 'window style parameters' also try to do
something with a window, so starting to look like a dead end

"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:eA**************@TK2MSFTNGP15.phx.gbl...
First, I would be very suspicious of the use of « F:\ » if it is a mapped
drive. Mapped drives are associated with a logon and will not be visible
from inside the ASP process and should be replaced with an UNC name.

Second, here a sample of the code that I'm using myself for running a
program with multiple parameters:

on error resume next
Application.Lock

CodeExit = wshShell.run ("""C:\Eval\EvEngine\RCTEvalTest.exe""
C:\EVAL\EvEngine assumption " & NomFichier & " " & NomFichierA, 0, true)

Application.UnLock
on error goto 0

If (CodeExit <> 0) Then
Response.Write "A nice error message goes here --"
end if

I don't remember the signification of the two parameters 0 and True that I
have put at the end of the call to Run() but maybe they are related to your problem.

Another possibility would be to try running a .BAT file instead.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF
"bbxrider" <bx******@comcast.net> wrote in message
news:OM*************@TK2MSFTNGP15.phx.gbl...
for win2k adv server/iis5.0
trying to run an external program from my asp routine that has multiple
parameters, see following

set shell = server.createobject("wscript.shell")
shell.Run """f:\phsData\htmldoc\htmldoc.exe"" --webpage -f phsnew.pdf
phsnew.htm"

program either doesn't get invoked, or has an error, but since it has no
error log i can't check that,
so not sure why not getting a result
i have run the program successfully from the command line in that
directory,
so know it can be run in
the first place and the asp program creates and writes files in the same
directory so i don't think its a
permission problem. asp doesn't complain with any errors

so i'm stumped here and was hoping somebody can give an idea to check or
something


Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Kyle | last post by:
To any who chose to provide an answer, or even any suggestions to this problem, I thank you greatly in advance. +200 pts. for any valid solutions. I am currently in the process of converting a...
5
by: Patrice FRITSCH | last post by:
I'm trying to run a batch file from an asp page using WScript.Shell object. Dim oWSH set oWSH= Server.CreateObject("WScript.Shell") call oWSH.Run("cmd.exe /c " & szCmd , 0, true) szCmd...
2
by: Marcin Zmyslowski | last post by:
Hello all! I have installed MSDE on my local computer - Windows 2000 Professional. I have created a function which runs me a link whose path is placed in the input field. This function looks...
6
by: MacKenzie | last post by:
The statement in an asp page: dim objShell Set objShell = WScript.CreateObject("WScript.Shell") now gives this error: VB err= 424,Object required If I use...
2
by: Mike John | last post by:
I am trying to use the shell object to send keys to the explorer browser to run the send page funcion. I am receiving the above error only when I put my html file in the web server...
4
by: Sam Learner | last post by:
Hi Everyone, I'd like to create my own Internet Popup windows Stopping program. Is there any code I could you to monitor when IE or Netscape opens a Windows from a clicked Link? how about managed...
1
by: Aaron West | last post by:
Try this script to see what queries are taking over a second. To get some real output, you need a long-running query. Here's one (estimated to take over an hour): PRINT GETDATE() select...
4
by: uinoma | last post by:
I want to open notepad in fullscreen mode, but this script that I created can't do that. . When I open Windows Manager Task, the program is just run in background, not appeared on web server...
0
by: arunpatil84 | last post by:
Hi , I am working on one ASP.NET application which zips the document files and allow the user to download the files. For that I am using Izarc command line freeware utility to zip the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.