PRISM-AY

Hello,

I have a project that contains one C++ DLL and several C# assemblies one of which is a CCW. The CCW has an installer class to register/unregister the respective TLB file.

I also have an installer DLL that registers/unregisters two COM DLLs during the install/uninstall process.

My setup package has the RemovePreviousVersions set to True. Everything works perfectly when I install the package when it has not been installed before. However, If I update the package and give it a new version, the new install starts and removes the old install, installs the new, registers my TLB file and then I get this error:

Error 1001. Could not find a part of the path 'C:\WINDOWS\assembly\GAC_MSIL\PRISM.CCW\1.0.1000.0__20c35f8edb870d93\PRISM.CCW.InstallState'.

The error above was copied from the log file found in the %temp% folder after the install. When I click on OK, the install rolls back.

What I found is when I look in the c:\windows\assembly before I run the install, my assemblies are listed there. When the error pops up, I refresh the folder and noticed that my assemblies are gone. Once the rollback is complete, my assemblies are restored.

I've searched and searched as to why this happens and how I can remedy it, but I just can't find anything. If anyone has any ideas or can point me in the right direction, that would be greatly appreciated. Thank you.




Re: ClickOnce and Setup & Deployment Projects Windows Installer Error 1001. Could not find a part of the path

PRISM

One other piece of information I discovered that's interesting. The error above actually shows up at the end of the uninstall when removing the package using the Add/Remove Programs from Control Panel, however, it does not impact the removal, i.e., successfully removes installation. I saw this by using the FILEMON utility. This error only pops up when I install a newer version of the package which has the RemovePreviousVersions set to True as mentioned in the original post.






Re: ClickOnce and Setup & Deployment Projects Windows Installer Error 1001. Could not find a part of the path

mister.net

did you ever find a fix i'm having pretty much an identicle problem



Re: ClickOnce and Setup & Deployment Projects Windows Installer Error 1001. Could not find a part of the path

PRISM

No I sure didn't. I keep having to manually uninstall my package and then install the new one. There's gotta be a solution to this. I needed to move on to other things. Hopefully someone would be kind enough to stumble on this thread and post a solution.




Re: ClickOnce and Setup & Deployment Projects Windows Installer Error 1001. Could not find a part of the path

mister.net

I actually bumped across a solution (can't remember the link). Not sure if it works. I had one of my students try it out, and he said it worked.

Put the custom install action in both the commit and the install phase. supposedly it only runs it in the commit phase (but I think my student said it ran it twice, but at least it ran). You can change the arguments to the program in both phases, so have your program ignore the non-needed run based on the arguments.

I'll try to get you the link to the solution he found.





Re: ClickOnce and Setup & Deployment Projects Windows Installer Error 1001. Could not find a part of the path

PRISM

Wow, I can't believe how close I actually came to solving this if that is indeed the solution. I think I had tried it moving it to one or the other, but not both. I can't believe I overlooked doing both. It'll be interesting to see if it would work without actually overriding the Commit and/or Install method and just using the default for the "dummy" one. When I have a chance to do that, I'll post my findings. Thank you.




Re: ClickOnce and Setup & Deployment Projects Windows Installer Error 1001. Could not find a part of the path

Stefan Krueger

Assemblies in the GAC are not available before the Commit phase. Note however that systems might have rollback disabled. On such systems Commit actions don't get executed.




Re: ClickOnce and Setup & Deployment Projects Windows Installer Error 1001. Could not find a part of the path

PRISM

I checked my set up for this and here's basically how I have my Custom Actions set up:

Install

Dummy Action*

Register TLB**

Commit

Register COM DLLs*

Dummy Action**

Rollback

Uninstall

UnRegister COM DLLs*

UnRegister TLB**

Those marked with * are the actions for the same DLL and the same for **. The custom installer does nothing, i.e., no override method for "Dummy Action" entries.

Does this look right, because it's this setup that does not install correctly over an existing install, i.e., the remove process fails. This is why I have to uninstall it first and then install a new version. Do I need to override the methods for the dummy actions even if I'm not doing anything in them but calling the base class






Re: ClickOnce and Setup & Deployment Projects Windows Installer Error 1001. Could not find a part of the path

PhilWilson

You don't need any of those custom actions. If you just mark the Register property of the TLB, then the setup will take care of it for you (the default is register anyway for TLBs I believe). The same is true of the Dlls. Mark them with vsdr Register and the setup will do it.




Re: ClickOnce and Setup & Deployment Projects Windows Installer Error 1001. Could not find a part of the path

PRISM

I wish that was true. That was what I did first as it was the obvious way to go, but it never worked and was extremely frustrating. The only way to get it to work was to create the custom actions. I have many welts on my forehead from all the banging against the wall. Wink




Re: ClickOnce and Setup & Deployment Projects Windows Installer Error 1001. Could not find a part of the path

PRISM

Just a quick follow up. I went ahead and added the overrides for the Install methods but they just call base.Install(...) and my actual working code is now in the overridden Commit method. In both cases, with and without the Install method, the installer still fails after it removes the pervious version and is ready to install the new one. Sigh...




Re: ClickOnce and Setup & Deployment Projects Windows Installer Error 1001. Could not find a part of the path

PRISM

Stefan Krueger wrote:
Assemblies in the GAC are not available before the Commit phase. Note however that systems might have rollback disabled. On such systems Commit actions don't get executed.

How would rollback be disabled That way I can check with our IT folks to make sure it's enabled. Thank you.






Re: ClickOnce and Setup & Deployment Projects Windows Installer Error 1001. Could not find a part of the path

PRISM

I have one more question. Should my custom code be before or after the call to the base class method, i.e.,

base.Install(savedState);

custom code...

or

custom code...

base.Install(savedState);






Re: ClickOnce and Setup & Deployment Projects Windows Installer Error 1001. Could not find a part of the path

Stefan Krueger

There are multiple way to disable rollback, see http://msdn2.microsoft.com/en-us/library/aa371370.aspx

Did you generate a verbose log of the install to see which actions are executed See http://www.msifaq.com/a/1022.htm "How do I create a log file of my installation " and http://www.msifaq.com/a/1045.htm "How do I interpret a Windows Installer log file "






Re: ClickOnce and Setup & Deployment Projects Windows Installer Error 1001. Could not find a part of the path

PRISM

Stefan Krueger wrote:

There are multiple way to disable rollback, see http://msdn2.microsoft.com/en-us/library/aa371370.aspx

Did you generate a verbose log of the install to see which actions are executed See http://www.msifaq.com/a/1022.htm "How do I create a log file of my installation " and http://www.msifaq.com/a/1045.htm "How do I interpret a Windows Installer log file "

I had set up detailed logging awhile ago, but didn't make heads or tails of it. I just didn't have the time to go into it the last time. I just can't understand why a tool that's supposed to be as straightforward as the MS Install seems so bug-ridden. I don't understand where these problems are coming from. I'm not doing anything "fancy" here and it has done nothing but waste my time and many other folk's time per all the problems I've seen reported. Sigh...

Any how, I ran my .msi file with the /lv flag to get the detailed log and then ran it through WiLogUtl (thank you for the links above). Below is the saved error results from the utility:

Code Snippet

Errors Found For Log File D:\Temp\myverboselog.txt

======================================================

5 Non-Ignored Errors

======================================================

-------------------------------------------------

Believed Error Found:

MSI (s) (3C:18) [12:56:53:546]: Leaked MSIHANDLE (16285) of type 790531 for thread 5996

MSI (s) (3C:18) [12:56:53:546]: Note: 1: 2769 2: _84D2BDB6_73D8_4F34_89CD_4AB9C5D74739.install 3: 1

MSI (s) (3C:18) [12:56:53:546]: Note: 1: 2262 2: Error 3: -2147287038

DEBUG: Error 2769: Custom Action _84D2BDB6_73D8_4F34_89CD_4AB9C5D74739.install did not close 1 MSIHANDLEs.

The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2769. The arguments are: _84D2BDB6_73D8_4F34_89CD_4AB9C5D74739.install, 1,

Action ended 12:56:53: InstallFinalize. Return value 3.

Proposed Solution To Error:

A standard action or custom action caused the failure.

-------------------------------------------------

Believed Error Found:

MSI (s) (3C:A0) [12:56:57:906]: Pathbuf: 0, pcchPathBuf: 0

MSI (s) (3C:A0) [12:56:58:031]: MsiProvideAssembly is returning: 0

MSI (s) (3C:A0) [12:56:58:046]: No System Restore sequence number for this installation.

MSI (s) (3C:A0) [12:56:58:046]: Unlocking Server

MSI (s) (3C:A0) [12:56:58:046]: PROPERTY CHANGE: Deleting UpdateStarted property. Its current value is '1'.

Action ended 12:56:58: INSTALL. Return value 3.

Proposed Solution To Error:

A standard action or custom action caused the failure.

-------------------------------------------------

Believed Error Found:

MSI (s) (3C:D8) [12:56:58:062]: Destroying RemoteAPI object.

MSI (s) (3C:CC) [12:56:58:062]: Custom Action Manager thread ending.

MSI (c) (9C:18) [12:56:58:078]: Back from server. Return value: 1603

MSI (c) (9C:18) [12:56:58:078]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1

MSI (c) (9C:18) [12:56:58:078]: PROPERTY CHANGE: Deleting SECONDSEQUENCE property. Its current value is '1'.

Action ended 12:56:58: ExecuteAction. Return value 3.

Proposed Solution To Error:

A standard action or custom action caused the failure.

-------------------------------------------------

Believed Error Found:

The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2826. The arguments are: FatalErrorForm, Line2, to the right

MSI (c) (9C:9C) [12:56:58:093]: Note: 1: 2262 2: Error 3: -2147287038

DEBUG: Error 2826: Control BannerBmp on dialog FatalErrorForm extends beyond the boundaries of the dialog to the right by 3 pixels

The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2826. The arguments are: FatalErrorForm, BannerBmp, to the right

Action ended 12:57:06: FatalErrorForm. Return value 1.

Action ended 12:57:06: INSTALL. Return value 3.

Proposed Solution To Error:

A standard action or custom action caused the failure.

-------------------------------------------------

Believed Error Found:

MSI (c) (9C:18) [12:57:06:781]: Note: 1: 2262 2: Error 3: -2147287038

MSI (c) (9C:18) [12:57:06:781]: Product: MyCo Report .NET Components -- Installation failed.

MSI (c) (9C:18) [12:57:06:781]: Grabbed execution mutex.

MSI (c) (9C:18) [12:57:06:781]: Cleaning up uninstalled install packages, if any exist

MSI (c) (9C:18) [12:57:06:781]: MainEngineThread is returning 1603

Proposed Solution To Error:

Fatal error during installation.

0 Ignored Errors

======================================================

-------------------------------------------------

Believed Error Found:

No Error Found!

Proposed Solution To Error:

No Solution Needed!

I've checked my custom install methods, i.e., Install, Commit and Uninstall and I can't find anything related to the messages above. My Install method just calls the base.Install() method and sets a local variable to the value passed in the this.Context.Parameters collection. Any actual work done is only in Commit and Uninstall.

I'll search some more on the errors to see if I can find anything else. If anyone can shed a bit more light on this issue, it would much appreciated.