Author Topic: Another Apache/Webbatch question  (Read 1446 times)

mhall

  • Jr. Member
  • **
  • Posts: 68
Another Apache/Webbatch question
« on: December 30, 2015, 07:51:24 am »
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

  • Tech Support
  • *****
  • Posts: 2138
    • WinBatch
Re: Another Apache/Webbatch question
« Reply #1 on: December 30, 2015, 10:43:53 am »
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.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


mhall

  • Jr. Member
  • **
  • Posts: 68
Re: Another Apache/Webbatch question
« Reply #2 on: December 30, 2015, 04:01:57 pm »
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

  • Tech Support
  • *****
  • Posts: 2138
    • WinBatch
Re: Another Apache/Webbatch question
« Reply #3 on: December 31, 2015, 07:25:45 am »
Good choice.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates