Announcement

Collapse
No announcement yet.

Shell from within a CGI works with XP not Vista

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Shell from within a CGI works with XP not Vista

    Shell from within a CGI program will work with XP, but not Vista.
    Anyone know a way to do this with Vista?

    The nice thing about it is that I can pop up a message box or
    do about anything based upon who hits a page. The work around
    with Vista so far has been to monitor a page and then perform the
    action. The XP server cgi program just executes my program(s).
    Testing with Abyss.

    Shell to the program below like this pid = shell("execute.exe msgbox.exe"
    This also works on XP, but on Vista the msgbox.exe keeps running in task manager.
    I will attempt running something that doesn't need user feedback.
    Code:
    REM cgi program does this
    COMPILE EXE
    #DIM ALL
    FUNCTION PBMAIN () AS LONG
        LOCAL pid AS DWORD
        pid = SHELL(COMMAND$)
    END FUNCTION
    Last edited by Mike Doty; 20 Sep 2009, 10:00 AM.
    The world is full of apathy, but who cares?

  • #2
    >but on Vista the msgbox.exe keeps running in task manager.

    Is msgbox.exe a system utility? I don't have one on XP/Pro SP3 all updates.

    If it's one of your programs, what does it do?

    Regardless, 'msgbox.exe' SHOULD keep running to its completion, as the posted program launches it asynchronously.

    MCM
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      In XP my msgbox.exe program does launch asynchronously when called from a XP cgi program.
      With Vista it appears to be part of the same process and the cgi programs stack up in Task Manager (because no GUI window was presented by the msgbox.exe.)

      Tried non-gui stuff in a cgi program called by Vista and the cgi programs still stack up in task manager until the asynchronously
      shelled to programs end.

      Not something that I need to have, but should be noted.
      If there is a way to get asynch working with Abyss and Vista would be nice so I get the same behavior as with XP.

      The reason I used a MsgBox was to see if the cgi program would continue and allow a GUI to be launched asynch with Vista.
      It does not with Vista, but XP does allow asynch shells from cgi's with Abyss to even gui programs.

      I'll play with this later tonight. Extremely low priority.
      Last edited by Mike Doty; 20 Sep 2009, 10:08 AM.
      The world is full of apathy, but who cares?

      Comment


      • #4
        Solution: Don't run as a service.

        If you are running Abyss Web Server as a Windows service, what you
        describe could make sense.

        CGI programs cans spawn other processes and launch programs. But these
        programs cannot do everything. Actually, Windows services are executed
        using a relatively restricted user account with no access to the desktop
        and to some interactive/multimedia devices (such as the sound card or
        the keyboard). This is the case since Windows 2000 and this behavior was
        enforced since 2003 in all Windows operating systems. So when Abyss Web
        Server running as a service launches a CGI application, the former will
        run with the services user privileges and any program the CGI launches
        inherits the same restrictions.

        If you have a way to get the return code from the Playsound or the Beep
        operation, you would find out that the system prohibited the operation
        or that the current user has no access to the sound device.

        But if you run Abyss Web Server in a user session, beeps and sound
        generation remains possible.

        If you need to monitor the execution of a CGI application, the best is
        to write into files or report Windows Events (the following article may
        help you <http://support.microsoft.com/kb/154576>).

        Thank you for using and supporting Abyss Web Server and please feel free
        to contact us if you have any question or feedback.

        Best regards,

        Support Team
        Aprelium - http://www.aprelium.com
        Last edited by Mike Doty; 20 Sep 2009, 10:37 AM.
        The world is full of apathy, but who cares?

        Comment

        Working...
        X