Hello, all:
This may be more of a Windows-centric question, but I figured this could be a good place to ask.
I'm trying to remotely invoke an instance of a Windows application from a PHP file running on Apache. I have successfully done this, but it has a curious side-effect. Normally, when a user invokes an application from the desktop, the user name assigned to the application (that you can see in the Windows Task Manager) is the user name currently logged in. However, if the same app is called up via PHP through Apache (or any other web service, I figure), the user name assigned to it is going to be either "SYSTEM" or "LOCAL SERVICE". This has WSW access a completely different set of preferences stored in the "C:\Documents and Settings\LocalService\Application Data\" directory rather than the user's personal preferences directory like "C:\Documents and Settings\John Smith\Application Data\". This can become confusing for users, as all preferences and other application settings will be different.
So, my question is this - is there some command-line option that I can specify in the PHP code that will force the application to be "owned" by the user currently logged in, rather than "SYSTEM" or "LOCAL SERVICE", preserving preferences and settings integrity on a user-by-user basis?
Additionally, if there is a way of specifying an owner on the command line, is there a system variable like "$CURRENT_USER" or something to that effect that the operating system will know which user is currently online?
Any assistance greatly appreciated.