Still cannot update service already installed

Got a problem you cannot solve? Try here.
mannaggia
Posts: 9
Joined: Sun Dec 10, 2006 9:02 pm

Still cannot update service already installed

Postby mannaggia » Sat Jan 13, 2007 10:24 pm

I'm evaluating IA and I had another thread about updating a service - I still cannot get it work - I'm about ready to give up.

My installer installs as service using Install Service. That works.

But I want to be able to release updated versions in the future, but not have a separate installer for a patch. I want users to be able to use the same installer for both new installs and update installs.

I have tried several things - simply pointing the Install Service command to the new file and rebuild - no luck. It does not touch the older file.

I tried using Control Service to stop the service on install, then use Install Files and/or Install service. No luck.

I tried adding a section after it does Apply Install, with just an Install Service command and another Apply Install - no luck.

In fact, if I stop the service and delete the service executable and re-run the installer (after rebuilding so the key changes) it doesn't even install the now missing file.

I used /l to create a log from an original install vs. an "update" install and I saw that in the "update" install, it has this line:

Code: Select all

Using cached product context: machine assigned for product <hex>


After that, it has some "Executing op:" lines, but not nearly as many as the log from the original install.

I don't know a lot about the inner workings of MSI, but it looks to me like it is thinking that the product is already installed and doesn't go through the install again, even though I have rebuild the installer which generates a new key - I assume that is a different key than what this is looking at.

If that is the cause, how do I get it to ignore the "cached product context" and reinstall the files?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Sun Jan 14, 2007 1:36 pm

Are you using a new revision code in your new setups?
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

mannaggia
Posts: 9
Joined: Sun Dec 10, 2006 9:02 pm

Postby mannaggia » Sun Jan 14, 2007 4:35 pm

Yes, if I am thinking of the same think you are talking about. There is an option that generates that new code each time you rebuild the installer, and that option is checked.

So when I run the second install (the "update"), it runs as if it were a "new" install - that is, it does not come up with the Modify/Repair/Remove dialog.

I am also changing the version number in the .exe file (which shows on the Version tab when looking at the properties of the .exe file in Windows Explorer).

mannaggia
Posts: 9
Joined: Sun Dec 10, 2006 9:02 pm

Postby mannaggia » Sun Jan 14, 2007 4:39 pm

As an aside, I created a new blank install script with 3 lines - I set $TARGETDIR, execute an Install Service (installing the updated file), then the Apply Changes command.

When I run this, it *does* update the service executable.

Putting these same commands at the end of the original installer and rebuilding and running it does *not* update the service executable.

Like I said before, it looks like it is seeing some "key" or "ID" somewhere that says "this product is already installed" and just skips everything in the installer.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 179 guests