narramadan
Posts: 15
Joined: Thu Jul 24, 2008 2:59 pm

Restrict re-Installation of the software if installed earlie

Hi All,

I am new to AdvancedInstaller and trying to create a professional installation.

I need help to restrict the user while trying to re-install the software once the software is installed earlier.

Right now am getting a Repair dialog screen while trying to re-install, Instead of that i would like to show custom dialog screen saying "The software is already installed".

Please help me how could i achieve this..

Thanks,
Madan N
narramadan
Posts: 15
Joined: Thu Jul 24, 2008 2:59 pm

Re: Restrict re-Installation of the software if installed earlie

Hi All,

Can anyone please help me out with this....

We have a release thats going on and we are struck with this problem....

Thanks in advance..

Madan N
Cristi
Posts: 34
Joined: Wed Oct 08, 2008 8:44 am
Contact: Website

Re: Restrict re-Installation of the software if installed earlie

Hi,

This can be done by scheduling a Error Message Custom Action under "InstallUISequence -> AppSearch" and set the "Message Text" to something like this:

Code: Select all

Product already installed!
The "Execution Condition" should look like this:

Code: Select all

Installed AND (REMOVE<>"ALL")
Keeping the SHIFT key pressed, drag-and-drop the custom action in tree control, under "InstallExecuteSequence -> AppSearch". This will create a copy of the action in the InstallExecuteSequence. Please make sure that the "Execution Condition" is the same as in the first Custom Action.
In order to prevent user modifications from Control Panel you can check the "Disable Modify" and "Disable Repair" options from the Product Details page. Please note that if you run the package with BasicUI the message will not be displayed.

However, to view the message even with BasicUI you can replace the Error Message Custom Action with a VB Script File attached to installation Custom Action scheduled under "InstallUISequence -> AppSearch". The VB Script you may use can look like this:

Code: Select all

Function Test()
 MsgBox("Product already installed!")
 Test=1602
End Function
The "Function Name" must be set to

Code: Select all

Test
and the "Execution Condition" should be the same as above.

Best regards,
Cristi
______________________________
Cristi Costache
Advanced Installer Team
http://www.advancedinstaller.com/
GordonD
Posts: 5
Joined: Thu Oct 16, 2008 10:51 pm

Re: Restrict re-Installation of the software if installed earlie

Cristi,

I added this feature to my product installer, however, rather than displaying the text placed in "Message Text", the dialog box displays the following standard error message in the dialog: "Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel."

Why is my custom text not being displayed?

Regards,
Gordon
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Restrict re-Installation of the software if installed earlie

Hi Gordon,

Usually this message is shown if you created a package, installed it, modified its contents and then you tried to install it again without uninstalling the original one. Basically, Windows Installer can upgrade the original package only if the modified one has a higher version and a different Product Code.

If you don't want to create a new version of the package you need to uninstall the original MSI before installing the modified one. However, if you want to create a new version which will upgrade the old one, you can follow the steps explained in the Upgrades article.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
narramadan
Posts: 15
Joined: Thu Jul 24, 2008 2:59 pm

Re: Restrict re-Installation of the software if installed earlie

Thnx Cristi..

The solution worked for me and was able to see the custom message when trying to re-install.

Madan N
GordonD
Posts: 5
Joined: Thu Oct 16, 2008 10:51 pm

Re: Restrict re-Installation of the software if installed earlie

Cosmin,

I understand. I was just wondering why, when I followed Cristi's instructions, the standard Windows Installer error message text was displayed rather than the text I entered into the "Message Text" field.

Regards,
Gordon

Return to “Common Problems”