lomo74 / mfilemon

Multi file port monitor - Automate print to file tasks in Windows
GNU General Public License v3.0
24 stars 7 forks source link

User command still launches applications as SYSTEM user #8

Open waaierpaaier opened 1 year ago

waaierpaaier commented 1 year ago

For Version 1.6.1

Despite the following change in version rel. 1.5.1:

  • Fixed a bug in user process creation (it was always launched as SYSTEM)

applications run via "User command" still launch as SYSTEM user no matter what user is entered in the port configuration.

To give some context: our main issue is trying to execute an application that allows for a GUI, which, as a SYSTEM user, does not seem to be possible. Applications (including notepad.exe) appear in the Task Manager as processes, but no GUI ever gets displayed.

Thanks!

lomo74 commented 1 year ago

For an application to pop-up in the user's desktop, running the executable as the user is not enough. You have to find a suitable desktop (in a TS environment you may have many), and pass this data to the CreateProcess API. This scenario is not yet covered by Mfilemon, but it could be. Have a look at "Winprint Hylafax Reloaded" to see how this is accomplished: https://sourceforge.net/projects/wphf-reloaded/ This is an interesting improvement, I'll evaluate it.

waaierpaaier commented 1 year ago

Thanks for the example and the quick response. We'd attempt a Pull Request ourselves, but it might be a little out of scope and skillset for us. Currently we're using named pipes and two applications, opening our sender via mfilemon and then communicating with a GUI receiver. Removing this convoluted step would help us immensely by cutting down on code, and perhaps resolving issues we're having with virtual desktops.

We're hopeful you might look into it.

Thanks!

lomo74 commented 10 months ago

Please contact me privately lomo74 gmail