473,853 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.createob ject("wscript.s hell")
shell.Run """f:\phsData\h tmldoc\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 7534
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.Loc k

CodeExit = wshShell.run ("""C:\Eval\EvE ngine\RCTEvalTe st.exe""
C:\EVAL\EvEngin e assumption " & NomFichier & " " & NomFichierA, 0, true)

Application.UnL ock
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******@comca st.net> wrote in message
news:OM******** *****@TK2MSFTNG P15.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.createob ject("wscript.s hell")
shell.Run """f:\phsData\h tmldoc\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******** ******@TK2MSFTN GP15.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.Loc k

CodeExit = wshShell.run ("""C:\Eval\EvE ngine\RCTEvalTe st.exe""
C:\EVAL\EvEngin e assumption " & NomFichier & " " & NomFichierA, 0, true)

Application.UnL ock
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******@comca st.net> wrote in message
news:OM******** *****@TK2MSFTNG P15.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.createob ject("wscript.s hell")
shell.Run """f:\phsData\h tmldoc\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
7122
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 website from an existing web host to our servers. This website used the WScript.Shell command to execute a series of Java commands that would send an encrypted email. I ran these commands directly on the server and they execute properly,
5
7044
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 contains the program to execute (fop.bat with several parameters). But I'm getting the following error message :
2
8484
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 like this: function runCommand(zmienna) { if (zmienna==-1) {
6
15651
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 setobjShell=Server.CreateObject("WScript.Shell"), I get the error VB err= 5,Invalid procedure call or argument
2
19284
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 folder.However if I am runing the file local it will work Any reason, why when the file is in the web server folder the create object failed to created the shell object. Systax:
4
1310
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 class, is there any? Please help. SJ
1
3488
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 count_big(*) from sys.objects s1, sys.objects s2, sys.objects s3, sys.objects s4, sys.objects s5 PRINT GETDATE()
4
12044
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 dekstop. Is the script wrong or missing something? Please check out this script and give me your ideas. <? $WshShell = new COM("WScript.Shell");
0
1345
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 files. I am able to create zip the file from if the source files are in local machine as well as if the files to be zipp are in other machines from the network. My code is as follow as
0
9898
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11020
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10670
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10735
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10358
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9506
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7907
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4549
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4143
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.