StdOut of Wscript.Shell is blank running 32bit command on 64bit Windows RRS feed

  • Question

  • User2013880101 posted


    I have an old 32bit EXE I've used for years in classic ASP to read/write EXIF data in JPEG files (jhead). In migrating this to Windows 2008 R2, 64bit, I can't seem to get the results I used to. Actually, I simply keep getting empty results, without any error.

    I've already set the app for the site to run in 32bit mode. The command works just fine in a command window on the server itself.

    Set getEXIF = Server.CreateObject("WScript.Shell")
    strOperation = "program path here" & jhead.exe & " path and filename here"
    Set resultsEXIF = getExif.exe(strOperation)
    if err.number <> 0 then
        Response.Write strOperation & "," & i
        Do While resultsEXIF.Status = 0
        strResults = resultsEXIF.StdOut.ReadAll
    end if  
    Wednesday, May 11, 2011 11:18 AM

All replies

  • User-1672167363 posted


    Yes, Old code and exes have problems in newer IIS Server and Systems.

    I suggest that you look at thread http://forums.iis.net/p/1176101/1973705.aspx 

    and follow the links, code, problems, and underlying changes to running executables using a service aka IIS Server.

    In some of the cases for above threads you can "HAck" the execution of exes but your opening up possible security problems.

    The problems / protection / Security changes are since Vista and Security with a "default" to "deny" "all"

              execution for the Standard User aka "Limited User".

    As you will notice in one of the Microsoft Support Fast help suggestions with example code that the use of Windows 2000 coding

     fails for the "Interactive User and Desktop". Even if you allow display of interaction for IIS Admin Service and Web Publishing

       you get hangs and errors.

    There is a possible way to get around direct execution issues by installing PHP Engine then run the exes via PHP Script.

    You can use the PHP Engine to use exec  as part of the PHP libraries look at this http://php.net/manual/en/function.exec.php  .






    Wednesday, May 11, 2011 1:07 PM
  • User416831374 posted

     I think the resume.com is a very much great idea

    Saturday, June 4, 2011 11:17 AM
  • User-1672167363 posted

    Hello @ renty

    Your Spam does not answer the question.


    Wednesday, June 8, 2011 8:45 PM