Web Connection
Running FILE BASED app.exe IN THE desktop FOREGROUND?
Gravatar is a globally recognized avatar based on your email address. Running FILE BASED app.exe IN THE desktop FOREGROUND?
  Hermann S
  All
  Jul 13, 2022 @ 09:47am

I know, I'm soo old-fashioned, running my APP.EXE process with the file-based method, but I like the visual aspect of this. However, when that .EXE crashes and Apache launches a NEW APP.EXE, the re-launched .EXE runs IN THE BACKGROUND, only visible on Task Manager, but on from the desktop. Is there any way how one could add code to the APP.EXE so that it yanks ITSELF into the desktop foreground, or how one could get Apache's APPSTART.BAT file to launch it straight into the foreground, maybe with user credentials or so submitted? Is there some way from Task Manager to get it into the foreground? Or maybe from the Admin command prompt? Thank you so much in advance! West Wind RULES!

Gravatar is a globally recognized avatar based on your email address. re: Running FILE BASED app.exe IN THE desktop FOREGROUND?
  Rick Strahl
  Hermann S
  Jul 13, 2022 @ 02:05pm

In order for the VFP app to run in the foreground it has to run as the INTERACTIVE user. This works when you launch the server because you're launching from the INTERACTIVE terminal interface. But Apache runs as a service under (presumably) the SYSTEM account and when it relaunches your instances they inherit that context.

You can run in COM mode and use DCOMCNFG and explicitly set the Impersonating User to INTEREACTIVE - that would give you also a visual on the desktop.

But - in general, this is a bad idea as somebody has to be logged on to the server - you can't run unattended in that scenario. You really shouldn't be doing this...

+++ Rick ---

© 1996-2024