[python-win32] Running GUI apps from a python/IIS web application

Roberto Aguilar roberto.c.aguilar at gmail.com
Thu Dec 2 04:02:06 CET 2010


On Dec 1, 2010, at 6:43 PM, Randy Syring wrote:
> On 12/01/2010 08:28 PM, Tim Roberts wrote:
>> Randy Syring wrote:
>>> It seems likely to me that you can not run a GUI program under a
>>> non-interactive service like IIS.  But, I am not 100% sure on this so I
>>> was hoping that this list might be able to shed some light on this topic.
>> Your analysis is quite correct.
> Thank you for the confirmation.
>> It is possible, through painful and creative use of CreateProcessAsUser,
>> to create a process as the user that is running on the primary visible
>> desktop.  Here's more information, although I don't really think it
>> solves your problem:
>> 
>> http://msdn.microsoft.com/en-us/library/ms683502.aspx
>> 
> Good to know, but you are correct that it doesn't solve the problem.  This program needs to work even when no users are logged into the server, as that will be the case 99% of the time.

My guess is that you do not have access to the source code of the .exe in order to yank out the dialog and recompile, correct?

We had a similar issue at work and ended up using Ollydbg [1] to find out where the msgbox call was being made within the executable.  Once located, the msgbox call and associated instructions were replaced with noop calls.

Hacky?  Absolutely.  Did it work?  Yep.

Hope this helps,
-Roberto.

[1] http://www.ollydbg.de/


More information about the python-win32 mailing list