WScript.Shell Run Error

K

Kyle

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,
but when I try to run them from within the WScript.Shell command then
I get a return code of 1, and the actions that should be completed are
not.

The shell is executing a .bat file which is in the same directory the
text files it needs to run the following sample command(s):

test.asp
----------------
SET myShell = Server.CreateObject("WScript.Shell")
RunCmd = "F:\InetPub\wwwroot\sitename.com\testing\runGpg.bat "
result=myShell.Run(RunCmd,,True)
Response.Write result & "<br>" ** Note: Result returns a value of '1'

runGpg.bat
-----------------
F:
cd Inetpub\Shared\tempMailFolder
java -classpath F:\InetPub\shared\javaMailSender PrintPass XXXXXX |
F:\InetPub\shared\gnupg-1.2.2\gpg --always-trust -q --batch
--no-comment --passphrase-fd=0 -sea -r (e-mail address removed)
859971130.txt

Just for testing purposes, I set the java.exe file, the javaMailSender
folder, and the tempMailFolder (where the batch is run), and the gnupg
folder to be allowed full control by the 'Everyone' group. I still
get a return code of 1.

I know this batch was executing on the old server, but it is giving me
a status code of 1 on this server. Is there anything you guys would
recommend I do to accomplish this task? Please keep in mind this DOES
execute properly when I run it directly on the server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top