Adding new component to existing setup.

Got a problem you cannot solve? Try here.
Post Reply
rahul gupta
Posts: 9
Joined: Wed Apr 14, 2010 4:22 am

Adding new component to existing setup.

Post by rahul gupta »

Hi All,
I need to add a new component to my existing set up.Please advise how this could be done.

Please find the case study as follows:
I have a IA setup version 1.0 and have the components/features to install as shown in attached file(IAversion 1.0). This set has run at the customer machine.Hence features installed on the sytem. Now I need to added a new feature/component.to existing set up so that if I rerun the existing set up that new feature (B2) appear in Maintanece mode for installtion.
IA setup feature selection screen.
IA setup feature selection screen.
IAVERSION1.0.JPG (32.13 KiB) Viewed 5466 times
Note:- Business Requirement is that previously installed setup should not be uninstalled it should be modified to see the changes in the setup screen.


Regards,
Rahul :)
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Adding new component to existing setup.

Post by mills »

Out of the box, you're not going to be able to do exactly what you want. However, I think it may be possible to achieve your goals...

I would start on a very simple level in a new project with only two features (one at first, then add one for the second installer) to test this...

In the Project Options, Build->Output, you can uncheck "Change revision code automatically on rebuilt". Just remember you did this, it has a significant impact on upgrades and patches...

Create your initial project with one file and one feature. Copy the installer (I use /ProjectPath/Installer as the place to keep the installers). I'd also rename it to setup_1_0.exe. (I used a single, compressed exe, by the way)

Now, add a feature and add a file to it.

Your product, revision and upgrade codes should all match what they were previously. Build this new setup (I'd call it setup_1_0_R2.exe).

Install the first setup.

Now run the second setup. You should see that the new feature is available. However, if you continue through the installation, you will notice that the file isn't installed. This is where you're going to need to get creative.

I didn't look into what's going on here or why it's not installing that file, I just wanted to see if I could get the features view to show the other feature available. You might need to step through and debug to see what's going on and where you'll need to place things.

You might need to add some code that copies a file from the DATADIR to TARGETDIR. Or, you might need to create a patch and have that run silently (by the way, creating a patch from the second setup with a different file in a different feature works [e.g. the file will be properly installed, but no option to select a particular feature appears], but make sure the revision code differs).

You might run into some trouble trying to uninstall, so I'd test that thoroughly as well...
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
rahul gupta
Posts: 9
Joined: Wed Apr 14, 2010 4:22 am

Re: Adding new component to existing setup.

Post by rahul gupta »

Hi Mills,
Thanks for your response. I tried the option as per your Response. I can see the new feature in the component tree when I run setup_1_0_R2.exe.But the problem is same as stated by you.That means the R2 setup is not installing the file against the new feature and while unistalling the application it actually doning nothing except removing the Control Panel Entry in Add & Remove Programs.By the way I created both R1 and R2 setup as web compressed build.

Please find the case study as follows:
I have a R1 setup installed at the customer's end with "Change revision code automatically on rebuild" as checked. I created the R2 setup with the mentioned option as unchecked.When I run the R2 setup I am able to see the new feature but the problem is same as mentioned above. while running the R2 setup I found that the Install File Command was not working,hence I tried another option for installing my file(s).I tried to Extract the 7zip file to the destination location.The file got extracted but not to the desired location.I mean suppose my target location is "$PROGRAMFILES$\$TITLE$\TEST" but the file got extracted at "$PROGRAMFILES$\$TITLE$\TEST\{some alphanumeric folder}".When I tried to uninstall the application the it did nothing as mentioned above. If this is the case then I think I have write script for uninstalling the file/folder?.If yes then I would need to write script for un-installing all file/folders,registry entries etc in my existing Setup.This would be against what InstallAware recommend or does automatically.

Therefore I request you to suggest some better approach to do the same.

I would like to remind again that the bussiness expectation is that the previously installed setup should not be unistalled for upgrading the application to a newer version; more precisely the newly added feature should open up in maintainence mode for installation and the uninstall process should also unistall the newly added feature.


Thanks & Regards
Rahul :)
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Adding new component to existing setup.

Post by mills »

You're definitely navigating into uncharted territory. I did want to present you with a framework that *could* allow you to do what you want.

Without going about this exactly as you want (with the added feature approach), have you considered deploying web updates? It would be close to what you're after and would make for a more seamless approach, especially since users will be able to have the option to install the updates or not...
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
rahul gupta
Posts: 9
Joined: Wed Apr 14, 2010 4:22 am

Re: Adding new component to existing setup.

Post by rahul gupta »

Hi mills,
Yes, I am using Web Updates for upgrading my Application.

Please find the case study for web updates used as follows:
I have a setup named R1 with "Change revision code automatically on rebuild" as checked. I get installed my setup at the customers end. In this setup I defined web update named after my application and in the version section I mapped it to the lastest version - 1.Now I created a new version R2 with a version no. higher to previous and mapped my web update with the previous version(latest - 1). The custom executable used to run the upgrade is itself the R2 setup exe with a command line parameter. Thus when this EXE runs it moves for a customised upgrade process. That means I am not using the code for the NEEDSUPGRADE Variable(Basic Setup template) where the code for Unisntalling the previous setup is written. I just redirect it to Maintanence mode.This is because I can't uninstall previous version even silently. In the Maintainence mode Icheck for the command line parameter, if found then I call my upgrade script else the Mainaince mode Component tree opens.
This is done for a reason and that is If user rerun the R1 setup again then that will open in Maintainance and If tries to Upgrade with R2 then R2 exe will run the customised upgrade script.

Thanks,
Rahul
Post Reply