Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 3 Jahren, 2 Monaten
Letzter Beitrag:
vor 3 Jahren, 2 Monaten
Beteiligte Autoren:
Erik Schwarz, Alexandre Leclerc, Peter Holemans

[WD19] How to find out running exe's

Startbeitrag von Erik Schwarz am 29.04.2015 09:40


Need to know whether my exe is still running to avoid starting it a second time.

Selecting single instance in the Project description or using the function exerunning works only, if the exe is started by the same user.

I Need to know whether it is running by any user on the machine. In Windows Task Manager there is a button 'Show all processes' for that purpose.

Any idea how to achieve that with Windev?




Hi Erik,

ExeRunning() ? (Not sure if it looks at the complete running list or only the current user)


Peter H.

von Peter Holemans - am 29.04.2015 10:55
Hi Erik,

ExeListProcess() will list all running processes. But I think that if you want all admin processes you will also need admin rights when your application is running. This must be tested if it's the case or not; I can't remember.

Best regards,
Alexandre Leclerc

von Alexandre Leclerc - am 29.04.2015 12:11
Hi Peter and Alexandre,

you are on right lane.

ExeListProcess does not show all processes with Standard user.
If I start the app as Administrator, then all processes are shown.

Is there a way to tell my app, that it should run under admin rights, although a Standard user has started it?



von Erik Schwarz - am 30.04.2015 06:56
Hi Erik,

When you generate the EXE and you must select a manifest file, specify at that point that you need administrative rights. Then each time the application is started the user will be prompted to run as administrator, if required.

This is the simplest solution. (The more complicated solution is to do it by code, just check WDSETUP to see how PCSoft did it. We used the same code in other applications that can run for a while as standard admin but must restart with admin rights for some specific commands.)

Best regards,
Alexandre Leclerc

von Alexandre Leclerc - am 30.04.2015 12:09
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.