WScript.Shell Run Error

Discussion in 'ASP General' started by Kyle, Jan 19, 2004.

  1. Kyle

    Kyle Guest

    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
    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.
     
    Kyle, Jan 19, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bill
    Replies:
    3
    Views:
    681
  2. Martin Danielson
    Replies:
    2
    Views:
    159
    Martin Danielson
    Feb 2, 2004
  3. Aayush Dubey
    Replies:
    0
    Views:
    527
    Aayush Dubey
    Aug 13, 2004
  4. Salty Dog
    Replies:
    4
    Views:
    855
    Salty Dog
    Feb 28, 2005
  5. Daniel Di Vita

    Wscript.Shell.run returns 254

    Daniel Di Vita, Apr 6, 2006, in forum: ASP General
    Replies:
    5
    Views:
    275
    Anthony Jones
    Apr 7, 2006
Loading...

Share This Page