cancel
Showing results for 
Search instead for 
Did you mean: 
usmanjamil
Pilgrim

Change Installation path through update

Hi

My installer project is a single installation type application. Once installed, it only gives option to modify or remove the existing installation. Is it possible that when I modify an existing installation, I can change the Installation path (TARGETDIR) in such a manner that when I uninstall it after modifying its install path, the application should remove files from the new Path.

Regards

Usman
Labels (1)
0 Kudos
5 Replies
Gvarma
Pilgrim

Re: Change Installation path through update

usmanjamil wrote:
Hi

My installer project is a single installation type application. Once installed, it only gives option to modify or remove the existing installation. Is it possible that when I modify an existing installation, I can change the Installation path (TARGETDIR) in such a manner that when I uninstall it after modifying its install path, the application should remove files from the new Path.

Regards

Usman


Weird situation, never had to do this..but perhaps you could try following

1. create a custom dialog box with option to change path.

2. Call this dialog box when user selects Modify button.

3. Detect if last installation path is changed (perhaps a registry comparison would help).

4. if path is changed then call your install event and move all files from old path to new path.

5. Create a registry entry indication current installation path.

I am not sure if you would be flawless in achieving your goal..but something to start with.

HTH
0 Kudos
usmanjamil
Pilgrim

Re: Change Installation path through update

Gvarma wrote:
Weird situation, never had to do this..but perhaps you could try following

1. create a custom dialog box with option to change path.

2. Call this dialog box when user selects Modify button.

3. Detect if last installation path is changed (perhaps a registry comparison would help).

4. if path is changed then call your install event and move all files from old path to new path.

5. Create a registry entry indication current installation path.

I am not sure if you would be flawless in achieving your goal..but something to start with.

HTH


Hi Gvarma

Thanks for your reply. All the tasks at my end will sure by handled exactly as you suggested. What I'm not sure about the behaviour of Installshield on it after I've modified the path, since I'm using the same Installer with same GUID, for modification, that installed my software at first place. Will the installer be able to remove the files on an Uninstall operation, or modify the files to new path on subsequent Modify operations. As I guess installshield keeps track of all the files copied at first place in a log somewhere and uses it to remove the files while uninstalling. So I was wondering, changing the path might not create problems while uninstalling.

Regards

Usman
0 Kudos
Gvarma
Pilgrim

Re: Change Installation path through update

usmanjamil wrote:
Hi Gvarma

Thanks for your reply. All the tasks at my end will sure by handled exactly as you suggested. What I'm not sure about the behaviour of Installshield on it after I've modified the path, since I'm using the same Installer with same GUID, for modification, that installed my software at first place. Will the installer be able to remove the files on an Uninstall operation, or modify the files to new path on subsequent Modify operations. As I guess installshield keeps track of all the files copied at first place in a log somewhere and uses it to remove the files while uninstalling. So I was wondering, changing the path might not create problems while uninstalling.

Regards

Usman


Usman,

your concern is very ligitimate, however considering the fact that you are going to use "Modify" event to initiate subset of re-installation event, my "guess" is every change that would be made to your application will be properly recorded in the MSI database (though I have never tried it myself). Hence I dont think you would need to be concerned with "proper uninstallation" of your application, best way to check this out would be you create a test project and check it out yourself.

worst comes to worst, if something goes wrong you would have to write some custom code to handle it.

HTH
0 Kudos
Highlighted
usmanjamil
Pilgrim

Re: Change Installation path through update

Hi Gvarma

You are absolutely right. It can easily be checked with a test installer. I thought it would be a very common scenario and save me the time for creating a test Installer. Anyway I'll test it and update the thread with the results. Thanks alot for your help.

Regards

Usman
0 Kudos
usmanjamil
Pilgrim

Re: Change Installation path through update

I tested it with a test installer. It totally works. All I had to do was to modify "TARGETDIR" constant on modifying the installation. Rest all was taken care of by the installshield itself. Once the TARGETDIR has been modified any further installation modifications are done at the new path. Uninstall also works perfect by removing files from the updated path.
0 Kudos