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

Uninstall without original MSI


7 replies to this topic

comecme

comecme
  • Members
  • 30 posts

Posted 17 June 2004 - 15:16

I've a problem uninstalling a MSI where the original MSI is no longer available. During uninstall, Windows Installer for some reason needs to have access to the original MSI on the original source location. This doesn't make sense, since the MSI is cached locally.

In order to see what I mean, do the following. You need to have vviewer.dll, which is part of the Visio Viewer 2002, which can be found here. After downloading vviewer.exe, extract it by running vviewer.exe /C /T:<FolderName>.
Create an empty MSI database and create a feature and a component. Set both to Favor Source. Insert the file vviewer.dll and tell DevStudio to extract the COM information from it.

Install the application, making sure to select Custom install (if you don't the application will get installed locally instead of running from source). After that, rename the source directory and try to uninstall the application using the Add/Remove Programs Panel. Windows Installer will ask for the location of the MSI file.

The problem occurs when the UnregisterTypeLibraries action is run. If you disable this action, or clear the TypeLib table, the application can be uninstalled without a problem.


I can somewhat imagine the UnregisterTypeLibraries action needing to have access to the DLL, but I don't see any reason why the installer would need to have access to the original MSI file.
Any ideas why this is happing?
Dick Nagtegaal

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 June 2004 - 09:13

Does a log file or the Windows event log give any clues? Maybe it tries to repair that component before uninstalling it?

comecme

comecme
  • Members
  • 30 posts

Posted 23 June 2004 - 12:37

The relevant part of the uninstall logfile probably is:
CODE
MSI (s) (E0:34): Doing action: UnregisterTypeLibraries
Action start 13:21:47: UnregisterTypeLibraries.
MSI (s) (E0:34): Resolving source.
MSI (s) (E0:34): Using cached product context: User non-assigned for product: 992C23C3DB9550F408D33941C22270E0
MSI (s) (E0:34): Using cached product context: User non-assigned for product: 992C23C3DB9550F408D33941C22270E0
MSI (s) (E0:34): User policy value 'SearchOrder' is 'nmu'
MSI (s) (E0:34): User policy value 'DisableMedia' is 0
MSI (s) (E0:34): Machine policy value 'AllowLockdownMedia' is 0
MSI (s) (E0:34): SOURCEMGMT: Media enabled only if package is safe.
MSI (s) (E0:34): SOURCEMGMT: Looking for sourcelist for product {3C32C299-59BD-4F05-803D-93142C22070E}
MSI (s) (E0:34): Using cached product context: User non-assigned for product: 992C23C3DB9550F408D33941C22270E0
MSI (s) (E0:34): SOURCEMGMT: Adding {3C32C299-59BD-4F05-803D-93142C22070E}; to potential sourcelist list (pcode;disk;relpath).
MSI (s) (E0:34): Using cached product context: User non-assigned for product: 992C23C3DB9550F408D33941C22270E0
MSI (s) (E0:34): SOURCEMGMT: Now checking product {3C32C299-59BD-4F05-803D-93142C22070E}
MSI (s) (E0:34): SOURCEMGMT: Media is enabled for product.
MSI (s) (E0:34): SOURCEMGMT: Attempting to use LastUsedSource from source list.
MSI (s) (E0:34): SOURCEMGMT: Trying source C:\Uninstall\.
MSI (s) (E0:34): Note: 1: 2203 2: C:\Uninstall\NoUninstall.Msi 3: -2147287037
MSI (s) (E0:34): SOURCEMGMT: Source is invalid due to missing/inaccessible package.
MSI (s) (E0:34): Note: 1: 1706 2: -2147483647 3: NoUninstall.Msi
MSI (s) (E0:34): SOURCEMGMT: Processing net source list.
MSI (s) (E0:34): Note: 1: 1706 2: -2147483647 3: NoUninstall.Msi
MSI (s) (E0:34): SOURCEMGMT: Processing media source list.
MSI (s) (E0:34): Note: 1: 2203 2:  3: -2147287037
MSI (s) (E0:34): SOURCEMGMT: Source is invalid due to missing/inaccessible package.
MSI (s) (E0:34): Note: 1: 1706 2: -2147483647 3: NoUninstall.Msi
MSI (s) (E0:34): SOURCEMGMT: Processing URL source list.
MSI (s) (E0:34): Note: 1: 1402 2: UNKNOWN\URL 3: 2
MSI (s) (E0:34): Note: 1: 1706 2: -2147483647 3: NoUninstall.Msi
MSI (s) (E0:34): Note: 1: 1706 2:  3: NoUninstall.Msi
MSI (s) (E0:34): SOURCEMGMT: Failed to resolve source
Error 1706.No valid source could be found for product Uninstall.  The Windows Installer cannot continue.
MSI (s) (E0:34): Product: Uninstall -- Error 1706.No valid source could be found for product Uninstall.  The Windows Installer cannot continue.

Action ended 13:21:51: UnregisterTypeLibraries. Return value 3.



Dick Nagtegaal

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 June 2004 - 15:40

Very strange - I have no idea why it is trying to resolve the source. I'd suggest you contact Microsoft about this.

comecme

comecme
  • Members
  • 30 posts

Posted 07 June 2006 - 10:36

I have contacted Microsoft about this, but their reply is that this behaviour is By Design. I strongly disagree with that. What it comes down to is that during the action UnregisterTypeLibraries from a Run From Source MSI, the Installer needs to have access to the original MSI. This shouldn't be necessary, since a cached version of that MSI is already available in C:\Windows\Installer.

MS states that during uninstall you need to obtain information from the file, but they don't mention which file they mean.

It would mean that if you've installed an application as RunFromSource from a CD, and your CD gets lost (or unreadable), you can't uninstall the application anymore!

Here's the reply from Microsofts MSI developers:

QUOTE
The customer's package is authored such that the components are installed run-from-source. Per the initial installation log:


MSI (s) (B8:E4) [11:09:31:435]: Feature: NewFeature1; Installed: Absent;  Request: Source;  Action: Source

MSI (s) (B8:E4) [11:09:31:435]: Component: NewComponent1; Installed: Absent;  Request: Source;  Action: Source


Therefore, everything is installed run-from-source (RFS). Just by nature of doing that you're indicating that the source should be available to you (otherwise, how could the application run since all of the files will be from the network location?).  The source comes from the fact that


1. Component NewComponent1 is marked with an attribute indicating optional -- therefore it can be installed local or source

2. Feature NewFeature1 is marked with an attribute that indicates it favors source.



In the absence of any feature direction, like ADDLOCAL=NewFeature1, then the product will be installed in it's default state, which per package authoring is run-from-source.


In order to unregister the type library, you have to obtain information from the file, so if you installed it RFS, that requires accessing the file on the network location. Thus the source is resolved to determine the location of the file.  Therefore the behavior you see is by design. If you had installed the component locally, then you wouldn't have seen the prompt because the info would have come from the locally installed file.


You could accomplish the local installation by setting the attributes on the component to indicate that it is local only or change the favor attributes on the feature to favor local. At least then in the default case, it would be installed locally on the machine.


If you don't support RFS, then don't author your package to allow it. For the way this package is authored, an install of "msiexec /i NoUninstall.msi /qb ADDLOCAL=ALL" will have uninstall w/out requiring the source.

Dick Nagtegaal

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 07 June 2006 - 21:18

QUOTE
MS states that during uninstall you need to obtain information from the file, but they don't mention which file they mean.

From my understanding they need acces to the file that contains the type library. However I don#t understand why.

saurabhgupta1403

saurabhgupta1403
  • Full Members
  • 17 posts

Posted 25 August 2010 - 13:12

Is there any update for the solution of this problem. I am also getting this error on my machine with some msi and not all msi.
I create msi using installshield 12.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 06 September 2010 - 21:52

I have now updated information about this.