Jump to content

how prevent multiple start of a UNIGUI-Exe?


Recommended Posts



Having another app that gets a list of running processes and takes your target exe as a parameter is one easy way to achieve this.

The attached code and compiled exe do just that.


the useage is 'launcher ExeToAttemptStart ParametersToExe'




  launcher c:\myprojects\app1\myapp.exe "some list of parameters that are optional"


The included batch file 'runit.bat' tries to start notepad and open abc.txt - it will only open notepad if it's not already running.


The app uses shellexecute to start the target and makes no attempt to hide the parent process so there is potential to tidy it up!

Running launcher without any parameters simply opens the mainform with the option to view all running processes.

You can modify/ extend the function isrunning to include specific users and or paths rather than just the exe name. 


I found the original code here


some years ago and have used it for a while without issue.


May be of some help?






Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...