Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

small update and uninstall


14 replies to this topic

scootyd

scootyd
  • Members
  • 17 posts

Posted 18 February 2005 - 01:04

Of my two product installers I have one that the update is working on. I need to figure out why so I can fix the other, but besides that I'm having an issue with the one that does work.

If I install v1.0 and then run the v1.1 installer performing a small update everything works great. When I go to Add/Remove programs I uninstall the product and only the files copied over in the small update are removed and nothing else is. Anyone know why that might be happening?

Thanks!

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 February 2005 - 14:24

Your smal update (if shipped aas .msi, not .msp) must include all the files and components, not just the modified files.

scootyd

scootyd
  • Members
  • 17 posts

Posted 18 February 2005 - 18:19

The small update is a complete installation package that contains all files included in the previous installation package. If I log the install of the small update it only copies the one versioned file that changed between the creation of the two install packages. Then when I uninstall the product from Add/Remove programs the only file removed is that one that was updated with the with the small update and all other files are left behind.

mandy

mandy
  • Members
  • 121 posts

Posted 18 February 2005 - 19:29

Are you sure it is technically a "Small Update?

Same "ProductCode", same "ProductVersion", but different package code?



scootyd

scootyd
  • Members
  • 17 posts

Posted 18 February 2005 - 19:33

Yes the "ProductCode" and "ProductVersion" are the same. The Package code for the build is generated when the installer package is built so it should be different for each installer.

mandy

mandy
  • Members
  • 121 posts

Posted 18 February 2005 - 21:29

Is the shortcut(s) and other entry points left behind?

Is the product still installed as far as the Installer is concerned? You could use this script to check (obviously the ProductCode must be substituted):

Const sPRODCODE = "{17DAB648-906B-4C29-B296-6FD780708377}"

Set oInst = CreateObject("WindowsInstaller.Installer")

Msgbox oInst.ProductInfo(sPRODCODE, "InstallLocation")

Set oInst = Nothing


If it's not installed, you should get an error.


scootyd

scootyd
  • Members
  • 17 posts

Posted 18 February 2005 - 21:50

Nice little snip-it of code.

There are no shortcuts created during either installation but I do create some registry entries. Those are created with the 1st install and not removed when I uninstall after applying the small update.

One thing to note is that I ran your code snip-it after each step. Here is what happened.
- Ran installer with v1.0 versioned file in it.
- Ran your code and it showed me the correct installdir.
- Ran installer with v1.1 versioned file in it. The file was updated in the install location.
- Ran your code and it showed me an empty installdir.
- I uninstalled from Add/Remove programs.
- Ran your code and it threw up the error your described.

Looks like the update is kinda messing things up. Does that sound right and if so any ideas?

mandy

mandy
  • Members
  • 121 posts

Posted 18 February 2005 - 23:57

That's what I call thorough testing.

Unfortunately, I'm even more confused than before! The only thing I can come up with is this script, which you could run at the same points during your install that you ran the other one:

Const sPRODCODE = "{4D719053-5593-11D3-8F25-0060085C1758}"

i = 0

Set oInst = CreateObject("WindowsInstaller.Installer")

Set oCompList = oInst.Components

For Each sCompCode in oCompList

Set oCompClients = oInst.ComponentClients(sCompCode)

For Each sClient in oCompClients

If sClient = sPRODCODE Then Msgbox sCompCode : i = i + 1

Next

Next

Msgbox i & " components were counted."

Set oCompClients = Nothing

Set oCompList = Nothing

Set oInst = Nothing


I'm not entirely sure what I'm trying to prove with this yet, but I think there may be a point to this? It might require another couple of scripts before we get to the bottom of it.

Basically, it seems as though the installation known as "ProductCode" is being removed although the components are being left behind (or reinstalled). If this is the case, the next step will be to discover which product(s) these component are then associated with.


scootyd

scootyd
  • Members
  • 17 posts

Posted 19 February 2005 - 00:38

I built your latest code into my test app and ran through my test procedure again. Here are the results.

- Ran installer with v1.0 versioned file in it.
- Ran latest code and it showed me 13 component codes and a count of 13 components.
- Ran installer with v1.1 versioned file in it. The file was updated in the install location.
- Ran your code and it showed me 13 component codes and a count of 13 components.
- I uninstalled from Add/Remove programs.
- Ran your code and it showed me 9 component codes and a count of 9 components. Of those 9 listed I have only 5 of them as components in my install package.

Don't know what that means, but the uninstall is removing the component that contains the file that is updated. All of the components left behind have no files updated in them.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 21 February 2005 - 11:12

Your first test seems to indicate that the install location information is lost during the update. This would explain why the files don't get removed (they don't exist in the now-invalid install location). Are you using the default install location or do you change the install dir during first time install?
Can you generate a verbose log file during the update and the uninstall?
Does your setup uninstall properly if you do not install the update?

mandy

mandy
  • Members
  • 121 posts

Posted 21 February 2005 - 12:16

The strangest thing is that while the first test suggests that the uninstall was successful, the second test suggests that there are components left on the machine that still have your product registered as a client!

Can this behaviour be reproduced on another (clean) machine?


scootyd

scootyd
  • Members
  • 17 posts

Posted 23 February 2005 - 23:16

I was able to reproduce the bahvior of components being left behind after an install and update. This was on a clean machine. I verified this by running my test app that read the component information for this product. I'm guessing that it does have something to do with some of the custom actions I am doing during the installation of this product. The INSTALLDIR variable is set at run time by searching the registry for a value and the user may change it if they would like. I'm guessing that has something to do with the problem here.

The uninstall does work correctly if I do not update it.

I've also attached the install log to this post. I will attach the update log to the next post. These logs are from installing the v1.1 installer and then using the v1.2 installer to update the previous install. This was done on the clean machine that I mentioned above.

Attached Files



scootyd

scootyd
  • Members
  • 17 posts

Posted 23 February 2005 - 23:16

Here is the update log.

Attached Files



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 February 2005 - 09:24

Unfortunately these are not verbose log files so the value of INSTALLDIR is not listed. Make sure the value of INSTALLDIR is set properly during the update, to the same location that was used during the initial install.

scootyd

scootyd
  • Members
  • 17 posts

Posted 02 March 2005 - 17:19

I'll give that a shot. I thought I set the verbose flag for these logs, but that could have been for another install test. biggrin.gif