cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Suryasish_CH
Level 3

Problem in major upgrade

I am using a copy of Installshield2008 professional. I have set the INSTALLDIR property under Installer Information/General Information/Product properties with a valid path, which is “c:/program files/my application name” which comes on the Destination Folder dialog the first time installation of the application. Now, when I am doing a major upgrade, I have conditionally bypass the Destination Folder dialog and retrieve the previous installed location and want to set that particular location in INSTALLDIR property, because I don’t want to loose some of the previous installed files and therefore want to run major upgrade on the previous installed location.
I have also set the Major upgrade settings as Install set up and then remove unneeded files under Media->upgrades->upgrade windows installer. Now, what the problem I am facing is that instead of upgrading on the previous location, some of the set up folder are getting copied into the default INSTALLDIR location that in my case is “c:/program files/my application name”. These folders are also getting deleted from my previous installed location, which is not my aim. Rather, I want to run major upgrade at the previously installed location with full fledged set of Setup files and folders which I have created. Please help.
Labels (1)
0 Kudos
(5) Replies
KathyMorey
Level 10

First, what kind of project are you using, Basic MSI, InstallScript or InstallScript MSI? Second, how are you retrieving the previous installation directory, and how/when are you setting INSTALLDIR to that value?

Have you logged an upgrade installation that put files in the wrong path?
0 Kudos
Suryasish_CH
Level 3

Thanks for your reply.
My project is a Basic MSI project.

I have written a custom action where I am setting the value of the property "ARPINSTALLOCATION" with the value of INSTALLDIR using MSISetProperty.Then when running major upgrade on previous installation,I am retrieving the value of the previous directory using MsiGetProductInfo() where previous product code is passsed as the first parameter and INSTALLPROPERTY_INSTALLOCATION as the second paarameter whereas 3rd and 4th parameter are string and Buffer value respectively.

I am setting the value of the INSTALLDIR property with the value of previous install location using MSISetProperty().I am calling a custom action on the next button click of server config dialog which is a custom dialog.I giving you the complete sequence.

welcome screen->License agreement->Destibnation folder->(Custom )Server config dialog(for first time installation)

welcome screen->(Custom )Server config dialog(for major upgrade)

Now I want to let you know one thing that i have previously mentioned is during major upgrade,I have conditionally bypass the destination folder dialog where the value of INSTALLDIR value is shown which is by default "c:/program files/my application name".This value remains unchanged if I change the value of INSTALLDIR in script and then go back to previous dialog pressing BACK button.Are you getting any clue from here?

Will you please explain how I can log an upgrade installation or rather where I will find the log where the upgrade installation details has been stored as this thing is completely unknown to me?Please guide me.
0 Kudos
klacounte
Level 6

Try using MsiSetTargetPath. Before a certain action, ResolveSource I think, you can modify INSTALLDIR using MsiSetProperty - afterwards you have to use MsiSetTargetPath.

Logging an upgrade is the same as a new install. Use /lvoicewarmupx with msiexec.exe or /v"/lvoicewarmupx " with setup.exe.
0 Kudos
Suryasish_CH
Level 3

Thnx to you all.My Problem has been solved using MsiSetTargetPath.
0 Kudos
WarrenMcDonald
Level 2

I am having the same problem with updates. Unfortunately I am fairly new to Install Shield so I don't understand the solution.

When you say "I have written a custom action where I am setting the value of the property "ARPINSTALLOCATION"" I don't understand what you are talking about. Are you talking about an InstallScript action or a VBScript action, or a custom function, or some other custom action?

When you talk about using functions like MsiGetProductInfo or MsiSetTargetPath what do you mean? Where are you "using" these functions, how do you call them, how do you pass parameters, etc.

I would greatly appreciate if you can give me some step-by-step instructions and a copy of the code to implement this solution. It sounds like it is exactly what I need, I just don't know enough to implement it.

Thanks.
0 Kudos