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
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Check for installer already running
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 22, 2008
10:40 AM
Check for installer already running
I would like to check if someone has launched another installer already, and exit the second installer if so. Any ideas? Are there any registry entries that get updated when the installer launches (and cleared when it exits, of course!)
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 22, 2008
11:22 AM
Registry entries I don't think so, but you can check the default temp folder, there should be install.dir.somenumber... but also maybe the previous installer hasn't cleaned up after itself.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 22, 2008
12:26 PM
I thought of that, but then I looked on my current machine and there are like twelve uncleaned-up such temp dirs. So that didn't seem wise to count on; I'd refuse to run legitimately.
The only thing I can think of is writing a java program to listen on a port, and then check if it's available. If the java program was killed at the same time as the installer exited, always, because it was a tree, it might work. But it might be tricky to get it to execute the code and return to the installer leaving the listener running AND able to be killed at installer exit (since I can't count on being able to execute another custom code action, if the user shot it down with task manager). And of course, picking ports is fraught with peril -- I'm sure I'll pick some popular internet game port and then my installer won't run at all if the user has loaded that game.
The only thing I can think of is writing a java program to listen on a port, and then check if it's available. If the java program was killed at the same time as the installer exited, always, because it was a tree, it might work. But it might be tricky to get it to execute the code and return to the installer leaving the listener running AND able to be killed at installer exit (since I can't count on being able to execute another custom code action, if the user shot it down with task manager). And of course, picking ports is fraught with peril -- I'm sure I'll pick some popular internet game port and then my installer won't run at all if the user has loaded that game.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 22, 2008
12:58 PM
But what exactly does a running installer mean?!? It means a window being present... and something happening in it, maybe it's the wizard section or the installing section; how can a user knowingly run a second installer without noticing the first one?!?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 22, 2008
01:13 PM
Never underestimate the power of the clueless user 😉 Beats me, it was a requirement of my management to "disallow multiple installer launches". Also, of course, on linux, multiple people can have different X sessions and then they really might not know about each other.