Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
7
Erster Beitrag:
vor 1 Jahr, 2 Monaten
Letzter Beitrag:
vor 1 Jahr, 2 Monaten
Beteiligte Autoren:
Fabrice Harari, StefanoG, EricV, Arie, DannHCS

[WD20] Exe started from a service is not visible

Startbeitrag von DannHCS am 11.06.2016 08:17

Hi,
I use a service that starts an exe (with ExeRun).

This exe opens a Window visible for a few seconds and than minimize it self on SysIcon.

If I starts the exe, it works fine, I can see the window and the sys icon.
But if I let the service starts the exe, it doesn't show the window and neither the sys icon.

Why?

Thanks,
Dann

Antworten:

Hi Dann

because a service is not supposed to have a UI, neither directly nor indirectly. Therefore, the user running it doesn't have rights to do what your exe needs.

You'll need to start your service with a "regular" user in order for it to have a chance to work.

Best regards

von Fabrice Harari - am 11.06.2016 13:15
I think it's the way he wants to start a UI for the management of the service itself as mano software do.
I have a lot of Windows services in my sistray bar.
Maybe he need to do that.

von StefanoG - am 12.06.2016 00:15
Hi Stefano

most of the time, what you see in the systray is a separate exe started with the system and dialoguing with the service, not an exe started BY the service.

Best regards

von Fabrice Harari - am 12.06.2016 20:41
And that is the solution.
Thanks it will be useful for me too.

von StefanoG - am 13.06.2016 00:17
It can even be the same exe started twice.
That's how the WD example works. On startup it detects the service-state and proproses to install/deinstall.
And it also shows an option to continue in a UI interface (with an option to even pause the service if you want).
Works for me.

von Arie - am 13.06.2016 07:27
Hello,
If you want your exe not visible and launch by anyway, you have tou use the api windows to launch it. There is option to call in silent mode.
You have to refer to API because is conditionned by OS for security.

Appeldll32 for "kernel32" and command "WinExec"

von EricV - am 14.06.2016 07:55
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.