Force only one instance of AdvancedInstaller GUI - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Force only one instance of AdvancedInstaller GUI

Using AI 7.7:
Is there a way that I can force only ONE AdvancedInstaller GUI (some programs offer this)?
This is interesting, since sometimes I find that more then one instance is opened, and it's not good to save the aip project this way (what if different changes were made by the two or more instances...?).

Is this possible?
Many thanks, Dashut.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Force only one instance of AdvancedInstaller GUI

Hi Dashut,

Advanced Installer does not implement this.
I've cooked up a small batch script for you. You can launch Advanced Installer by running it. It will ensure only one instance is opened.

Code: Select all

@echo off
:: list processes
tasklist > processes.txt

:: search advinst.exe in the process list
findstr advinst.exe processes.txt > searchresult.txt

:: set our result env variable to a default value
set myresult=default

:: get the result of our searching for advinst.exe
set /p myresult= < searchresult.txt

:: test if myresult still has 'd' as the first letter, meaning it still has the default value
:: in which case advinst.exe is not running therefore we can launch it
if %myresult:~0,1%==d start "title" "C:\Program Files (x86)\Caphyon\Advanced Installer 7.7\bin\x86\advinst.exe"

:: delete our intermediary files
del processes.txt
del searchresult.txt
I've also added the improvement on our TODO list so we can support this behavior in the future.

Let me know if it helps.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Re: Force only one instance of AdvancedInstaller GUI

Works, thanks. Now I have to "tell" Windows that *.aip files should be opened by this batch file, otherwise it's still not complete.
It's good to know that you've added this to the TODO list for future releases.

Thanks for everything, Dashut.

Return to “Common Problems”