Results 1 to 2 of 2

Thread: WScript not executing on WinServ2003

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2010
    Posts
    8

    WScript not executing on WinServ2003

    I can create the WScript object - I am not having a permissions error. The problem is I'm trying to call a BAT file and what was working on WinXP no longer works on Win Server 2003.

    I'm running IIS with anonymous access but am using a specific local acct (not IUSR). This account has full access to the BAT, EXE and dir where it's located.

    Other WScript shell scripts are working, just not the call to this BAT. The BAT does work from command line, so I assume this is an acct issue but I can't figure out where. Any thoughts?

    Here's the code:
    Code:
    Set WshShell = CreateObject("WScript.Shell")
    Set WshExec = WshShell.Exec("C:\pdf2text.bat " & filename) 'where filename is the name of a PDF file in the FS
    pdftext = WshExec.StdOut.ReadAll
    
    'pdftext should now hold the text content inside the PDF filename
    Here's the BAT code:
    Code:
    CD C:\Inetpub\wwwroot\HCForum\uploadfiles
    pdftotext.exe -nopgbrk -eol dos %1 -
    'where %1 is the filename arg passed in, and dash (-) causes the result to be sent to StdOut
    Thanks in advance for any advice!

  2. #2

    Thread Starter
    New Member
    Join Date
    Dec 2010
    Posts
    8

    Re: WScript not executing on WinServ2003

    wow, no replies?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width