vigyanlabsmys
Posts: 73
Joined: Sat May 17, 2014 12:37 pm

Exit installer if same version is found

Hi

We have a problem in advanced installer, first we install the product on system, its getting installed successfully next time if I run same installer its showing "modify,repair, remove" options page. I don't want to show that page to user, instead of that I want to display "This version is already installed on your computer". So how to do this??
Best Regards,
Dan
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Exit installer if same version is found

Hello,

In order to achieve what you want you can add a "Display error message" custom action like this:
  • Message: This version is already installed on your computer!
scheduled in "Custom Actions" page after "Wizard Dialogs Stage -> Paths Resolution" actions group and configured to run only on "Maintenance".

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vigyanlabsmys
Posts: 73
Joined: Sat May 17, 2014 12:37 pm

Re: Exit installer if same version is found

Thank you. It worked.
Best Regards,
Dan
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Exit installer if same version is found

You're welcome.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vigyanlabsmys
Posts: 73
Joined: Sat May 17, 2014 12:37 pm

Re: Exit installer if same version is found

Hi,

Its working fine if I double click on installer. But if I try on silent install, the application is getting uninstalled first and then installed again. So I want pop up message "This version is already installed on your computer!" . So how to do this for silent install also??
Best Regards,
Dan
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Exit installer if same version is found

Hello,

In order to achieve this too you can add an "Execute inline script code" custom action with sequence scheduled after "Install Execution Stage -> Paths Resolution" actions group scheduled on maintenance only, which uses the following code:

Code: Select all

Function MyVBScriptCA()
	MsgBox "This version is already installed on your computer!"
	'return error
  MyVBScriptCA = 3
  Exit Function
End Function

MyVBScriptCA()
If you have any question let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vigyanlabsmys
Posts: 73
Joined: Sat May 17, 2014 12:37 pm

Re: Exit installer if same version is found

Hi,

Thank you, its working fine. But I want to localize message "This version is already installed on your computer". For non silent I have done but for silent how to localize that message??

And one more serious problem is during upgrade also, same text ("This version is already installed on your computer") is coming and installation is getting aborted. So can you tell us how to avoid this during upgrade?
Best Regards,
Dan
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Exit installer if same version is found

Hello,

In order to achieve this you can replace the following message box code:

Code: Select all

MsgBox "This version is already installed on your computer!"
with a new one displaying a property value as a message content:

Code: Select all

MsgBox Session.Property("MY_PROP")
Then, you can add the "MY_PROP" property in "Install Parameters" page, right click on its "Value" field and click on "Localization..." context menu option. Please note that the "Localization..." context menu option will be enabled only after adding the property in "Install Parameters" page. Also, you can take a look on our "Localize a property's value" how to which should be useful for you.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vigyanlabsmys
Posts: 73
Joined: Sat May 17, 2014 12:37 pm

Re: Exit installer if same version is found

Thank you. But what about And one more serious problem is during upgrade also, same text ("This version is already installed on your computer") is coming and installation is getting aborted. So can you tell us how to avoid this during upgrade?
Best Regards,
Dan
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Exit installer if same version is found

Hello,

I'm not sure why this happens. Can you please make sure both of your custom actions are conditioned to run only on "Maintenance" and test again the scenario? If the behavior still persists can you please send us the .AIPs (project files) of your target and upgraded versions and a verbose log of the upgrade installation to support at advancedinstaller dot com so we can investigate them?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vigyanlabsmys
Posts: 73
Joined: Sat May 17, 2014 12:37 pm

Re: Exit installer if same version is found

I have sent the file.
Best Regards,
Dan
vigyanlabsmys
Posts: 73
Joined: Sat May 17, 2014 12:37 pm

Re: Exit installer if same version is found

Hi,

1. In file.aip, I have included two msm files and same msm is included
in file1.aip, if I add any new file in "files and folder" an error will occur while building patch. The error file is "update_error1.txt'' and if I remove that msm file in file1.aip, its working fine.Why this is happening ?

2. I have updated the installer, but still Version and file are not getting updated. Why?
Attachments
update_error1.txt
(16.69 KiB) Downloaded 380 times
Best Regards,
Dan
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Exit installer if same version is found

Hello Anand ,

Unfortunately, this is caused by an Advanced Installer limitation. Currently you cannot build a patch between a target MSI (including a MSM(s)) and an upgraded MSI (including the same MSM(s)) which contains a new file(s) added. This is because at build time Advanced Installer add at first the files from the project in the CAB and then the files contained by the MSM. Therefore, when adding a new file in the upgraded MSI the sequence number of the MSM files will be shifted with one position in the CAB of the built MSI. Therefore the sequence number of the MSM files will be changed in the "File" table and this will break the patches rules. This is an Advanced Installer limitation. An improvement will be added in a future version of Advanced Installer, thank you for bringing this to our attention.

Until then, as a workaround you should manually add the MSM files into your target and upgraded project.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vigyanlabsmys
Posts: 73
Joined: Sat May 17, 2014 12:37 pm

Re: Exit installer if same version is found

Hi,

if same version is found, in verbose log it will write error 1603. But I don't want to display it as error instead of that I want to display success in log file.

I have tried return code 1 in vbscript you have given, but installer will act as "modify or repair" mode. I don't want installer to behave like that. So how to do this (please tell solution for silent and non silent installation) ?
Best Regards,
Dan
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Exit installer if same version is found

Hello,

Unfortunately, this is the Windows Installer behavior and it cannot be changed. You cannot stop an installation without triggering an error return value. So, either you will return an error return value and stop the installation or return a success return value and the installation finishes successfully.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”