Another Apache/Webbatch question

Started by mhall, December 30, 2015, 07:51:24 AM

Previous topic - Next topic

mhall

Hi All,

OK, so I've been working through the night to update my configuration and get things working here on my transition to Apache. And, largely, they are working well.

However, I've run into one gotcha that, from a security standpoint, makes sense, but that I need to get rid of. I need to be able to allow Webbatch to launch other programs as the local user account interactively.

The reason is that this is an internal site, run on my own local machine and is actually the hub for my activities. Currently, running on Sambar, I can use run() in Webbatch to, for example, launch notepad and open a text file. Or I can open a file in Photoshop, or move files on disk. Essentially, the browser has become my interface for nearly everything and I use Webbatch in the background to launch applications, etc. I can use the COM controls built into Webbatch to control Photoshop and generate output.

It's a feature I've really come to rely on and I'm hoping I can configure things with Apache similarly. Right now the programs will launch via Webbatch, but they are running as background processes and I can't interact with them. As a simple test, I have my site set to run notepad I can see multiple instances of notepad running in the task manager, but the only thing I can do is terminate them! My image viewer program starts, but again is running in a non-interactive fashion.

I've tried changing the Apache service settings so that the Log On includes "Allow Interaction with Desktop". I've tried assigning the Service to run using an elevated account as well as running Apache from a shortcut with elevated privileges. I've also tried various different run commands ... runShell() runWithLogin(), etc. But it all still runs as a background process - I'm assuming that's being inherited from the Apache process.

Any ideas of how I could launch a program via Webbatch in an interactive mode?

~Micheal


td

Setting a service to "Allow Interaction with Desktop" does not allow the service to interact with the desktop.  IIRC, it simply allows the service to interact with a virtual desktop which is not seen by the user.  As MFT states, "Services cannot directly interact with a user as of Windows Vista."  There are several Rube Goldbergian ways to workaround this problem that involve the terminal service extender and /or a desktop background process that can detect and execute requests made by the service.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

mhall

Thanks Tony.

So it looks like I need to run not as a service and it turns out that's pretty easy to do. RunHide comes in handy here to tuck the console window away where I don't see it. :)

~Micheal

td

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade