cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
timstspry
Level 7

Upgrade Question

Hello, I have an existing InstallScriptMSI project for let's say version 2.0 of my product. I need to modify the installer to perform an upgrade to version 2.1 of my product. I have gone through all the upgrade wizards, etc. and it seems that I am missing some components in the new installer. Not sure how that happened, but O.K. So, I must perform a major upgrade - again O.K., but my question/problem is I need to be able to preserver some user-configured settings such as logon accounts for a couple of services, logon account for a COM+ application - which by the way have not changed since version 2.0.

So, a major upgrade either completely uninstalls the existing version prior to running the upgrade, or installs over the top of the existing version and deletes unneeded files after the upgrade. Either way, my user-configured data for the logon accounts is gone. The online help in IS states that if you need to retain some of the end-user data, create a custom action that backs up this data and then replaces it after the installation is complete. O.K., not sure I know how or what to do in a CA to capture the logon account information including passwords for a couple of services and one COM+ application.

Any advice would be appreciated!

Tim
Labels (1)
0 Kudos
(3) Replies
Jeremy_Lloyd
Level 3

Tim, I think you may find it's too late now anyway. I had a similar problem myself before. Someone far better at Windows Installer projects than me may put me straight, but...

the problem is that the first thing that runs is the uninstaller for the previous version. Therefore its the uninstaller of the version of the product you already have installed which needs to backup your settings etc. But, since that uninstaller is already on the machine from your previous installation, that means you can't.

See attached ZIP for screen shots of the configuration in IS2009 (obviously not 2010, because there is no SAB in 2010!) and a sample CustomActions.vbs to backup a configuration file. As you will see however, these run during the uninstall phase of the installation being uninstalled.

As I said, unless someone knows a better way, for now I think you are hosed. I got bit by this one too.

Regards
Jeremy
0 Kudos
Jeremy_Lloyd
Level 3

Ok, looked at your web site. Looks like I'm teaching you how to suck eggs!

There is a "Security" registry key under HKLM\System\CurrentControlSet\Services\\Security which I would guess holds all the login details for the service. You could try copying it out then copying it back using the Registry read and write methods in WSH.

You also have the QueryServiceConfig2 and ChangeServiceConfig2 Win32 API functions to query the configuration of a service, which might be the "proper" way to do it.

There's also a set of classes for COM+ administration which will get you the properties of a COM+ server. I've never used these but they're all documented in the Platform SDK under "Component Development" then "COM+ (Component Services)"

Rgds
0 Kudos
timstspry
Level 7

Thanks Jeremy! I appreciate the information.

Take care,

Tim
0 Kudos