cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
krishnaKumar
Level 5

To execute a custom action before Installation begins

Hi,

I have build a setup file using IS 2008. It is a Basic MSI project. Now the Setup file is working fine and the installation of my application in the target machine is perfect.
we have brought in a major change in our application. Till this time, the application was getting registered in the HKEY_CURRENT_USER registry but now we have changed it to HKEY_LOCAL_MACHINE. So it was decided that the new setup will be installed to all our existing clients.
Now the actual process that should happen during Installation of the new version is like this.
1. First check for the existence of the Older version.
2. If present uninstall the version.
3. Install the new version.

I have written a program that checks for the existence of the older version and if present, it would uninstall the application. It is an .exe file. I decided to build a custom action to do this process. But I was not able to succeed in it.

Please can anyone help me on how to build a custom action and also in which sequence it should work along with the location where the exe should be stored.

Please let me know on how to run my exe before the Installation starts. I thought of another idea but i think it is not the rigtht way. I created prerequisite using this exe and this would fire b4 the installation starts. This option is working fine.

I need advices from the IS experts and please do help me out.

Waiting for an early response.

warm regards,

krishna kumar.
Labels (1)
0 Kudos
(5) Replies
ElenaN
Level 6

You write that you need next behavior:
1. First check for the existence of the Older version.
2. If present uninstall the version.
3. Install the new version.

But this is standard behavior of Major Upgrade.

You can just create MajorUpgrade under Upgrade view of IDE and Windows Installer will do all work for you

You can find all necessary information in InstallShield’s help
http://helpnet.acresso.com/robo/projects/installshield11helplib/CreatingMajorUpgrades.htm
http://helpnet.acresso.com/robo/projects/installshield12helplib/MajorMinorSmall.htm
0 Kudos
TheResearch
Level 6

Yes, Elena is right.

What you are trying to achieve is the behaviour of Major Upgrade. Check whether you could overcome your problem through Major Upgrade..
0 Kudos
krishnaKumar
Level 5

Hi,

Thank you all for your valuable reply. I would like to know whether i could get a documentation on how to do a major upgrade ?. Moreover the older version was build in InstallShield 10. Is it possible to do a major upgrade for that. I am working on IS 2008 and i have created a new project for building the setup. I have not used the Older version or upgraded that version to IS2008.

I am very new to InstallShield as my area is quiet different from creating Installers. I am basically from the .NET product development team and i am working for a client in getting their product developed. This is actually an enhancement work that i am doing on the application with major changes like changing the registry where the product information are stored.

How can i build a major upgrade ?. Will i require a to convert the setup developed in IS X. Since the GUID will be different for both the setup as both are two different setup projects.

I think i am confusing a bit because i am confused on how exactly to proceed further.

Sorry for the inconvenience.

Awaiting your reply,

krishna
0 Kudos
TheResearch
Level 6

0 Kudos
ElenaN
Level 6

To create a major upgrade it is not needed to convert previous project to IS2008. You should just specify UpgradeCode of previous product version for which you would like to create this upgrade.

In general Windows Installer will do next things for you:
1.Check if there is any products (on target machine) with specified in your current setup UpgradeCode
2.If yes first uninstall this found old version using “old” installation package
3.And after that install new version like a fresh install
But all this steps is “hidden” inside new version installation process

And if you have InstallShield you shouldn’t experience problems with documentation – even documentation installed with the product can provide you with all necessary information (Help -> Index -> “Major Upgrade” ).
Google also very helpful - “InstallShield Major Upgrade” 🙂
0 Kudos