Jump to content

AutoIt console app via apache web server


ieds
 Share

Recommended Posts

I'm attempting to use AutoIt to control a windows GUI application via the web

A simple version might look like this:

Run("notepad.exe")
$Text=ControlGetText("[CLASS:Notepad]","","[CLASSNN:Edit1]")

ConsoleWrite("Content-type: text/plain" & @CRLF & @CRLF)
ConsoleWrite($Text)

I compile this as a console application and place it in my cgi-bin folder (windows server)

If I launch the exe myself whilst I'm logged into the machine, the GUI launches, any text is extracted and is written to the command window.

But, If I try to launch it via a web browser it gets stuck (the request eventually times out) - no error in apache logs

I've also tested without launching the GUI app:

ConsoleWrite("Content-type: text/plain" & @CRLF & @CRLF & "Hello World!")

Visiting www.mysite.com/cgi-bin/myprog.exe works as expected.

So I'm guessing the windows Apache service doesn't have permission to open a GUI application.

Can anyone suggest a workaround for this?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...