Solved

Using PHP to start a .NET EXE - My .EXE Hangs when I try to pop a GUI item!

Posted on 2008-10-23
1
464 Views
Last Modified: 2012-06-27
I've now spent over 3 hours trying to invoke an EXE file from my PHP code.

******** My Setup *********************************
Dedicated Server running windows server 2003 (IIS 6)

******** What I need to do *********************************
What I need to do: I need to use a command that executes a VB.NET program (with a GUI) that should run and eventually terminate thus passing control back to the PHP Script.

Here's the problem. I can run a console-based VB.NET program just fine, but the moment I try to pop a MsgBox() or something, the program just hangs... for eternity.

I do understand that, since the EXE is being invoked by a PHP script, the EXE is being run under the IUSR account.

I believe that IUSR is able to do some simple things (such as write to console or write to file) but not more complex things that require certain DLLs (MessageBoxes, Internet Queries).

THE QUESTION: Is there some way for me to Invoke a GUI .NET application from php script?


My General Thoughts:
- There must be some way to register all of the appropriate DLLs with the IUSR account.
- Or, if I could get the application to run under a different user with more permissions, I'd be a happy camper.
- I dont really need the GUI to appear - but i included that in the question because I have some functionality such as querying URLs that will require .NET dlls
- I've heard rumor that ASP is better at running .NET exe's, but I don't know if the EXE's will run at their "full potential"
- I really dont want to have to change to a damn scripting language for the task that this EXE performs
- I'm also sure had I not tried to "pop a message box" that the EXE would hang anyway the moment it tries to display its main form

Thanks in advance for your help





0
Comment
Question by:hamlin11
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
hamlin11 earned 0 total points
ID: 22817976
The answer is to A) make sure you are aware of the programs actual working directory as far as the operating system is concerned (you may be surprised) and B) make sure that read/execute/write permissions are on the appropriate files/folders and C) do not try any GUI elements at all.


0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Visual Studio hangs on running project 6 61
windows Server 2003 in 2017 10 73
SSIS GUID Variable 2 34
Convert php array to comma seperated list 19 35
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question