This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Detect if setup.exe is already running
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jun 26, 2008
04:49 AM
Detect if setup.exe is already running
Dear all!
I'm trying to prevent the user from running setup.exe twice.
I do a lot of hardware checks at the beginning of the installation. These checks are all logged into one single log-file. Now if the user starts setup.exe again the log-file gets messed up by the two running instances...
Is there an easy way to prevent setup.exe from running twice?
Thank you in advance for your help!
Michael
I'm trying to prevent the user from running setup.exe twice.
I do a lot of hardware checks at the beginning of the installation. These checks are all logged into one single log-file. Now if the user starts setup.exe again the log-file gets messed up by the two running instances...
Is there an easy way to prevent setup.exe from running twice?
Thank you in advance for your help!
Michael
(3) Replies
‎Jul 03, 2008
10:25 AM
How do you access this log file - if it's through a single section of InstallScript or C++, etc., code (as opposed to several custom actions), could you just open the log file (or a helper lock file) exclusively, and fail when the second process cannot open it due to a sharing violation?
‎Jul 03, 2008
11:24 AM
MichaelHu wrote:
Dear all!
I'm trying to prevent the user from running setup.exe twice.
I do a lot of hardware checks at the beginning of the installation. These checks are all logged into one single log-file. Now if the user starts setup.exe again the log-file gets messed up by the two running instances...
Is there an easy way to prevent setup.exe from running twice?
Thank you in advance for your help!
Michael
only for my understanding: you call an MSI Package within an setup.exe right?
Well if you call a setup.exe (which is normally the wrapper to a original MSI File) you can check for the Windows Installer Error Code 1500, which means that the Installer can't run two setups at the same time.. the error will be produced if the Windows Installer on the target machine tries to
(or the user manually of course) run setup.exe 2 times in the same sequence..
and then (maybe with an "if.... statement") you can lock the log file and print out an error message and the log shoudn't be messed by the second setup.exe Wrapper Instance