[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.setup

Error during Uninstall leads to corrupted package

4LetterState

5/21/2008 2:43:00 PM

Hello,
I have an install package that has a custom action for the Install and
Uninstall methods. Our application uses an Excel Add-in. During an uninstall,
if Excel is open, I hit error 1306 as that application has my Add-in file
locked. Instead of closing Excel, I choose to cancel the uninstall. At this
point, my .InstallState file has already been deleted because the CA runs
successfully before the REMOVEFILE action (where the 1306 error occurs).

So, on the 2nd attempt to uninstall (with Excel closed), I am unable to
remove the package because I have lost my .InstallState file and information.
The uninstall custom action fails as a result of missing state information.

I know how to correct the problem and get the package removed (MSIZAP).
But, I would really like to know if it is possible to retain that State
information until the very last moment in the uninstall. I have tried
re-ordering events in the InstallExecuteSequence, but I can't have the
Uninstall CA after the RemoveFiles action.

Any ideas?
Thanks,
Brenda
1 Answer

Phil Wilson

5/22/2008 5:08:00 PM

0

I think you should start by adding the installer class custom actions to all
the custom action nodes if all you have is install and uninstall. Without a
Rollback custom action (and a Commit) the results are going to be
unpredictable. Rollback custom actions are for when an install operation has
to be backed out. Commit is for when it's succeeded. The base methods need
calling to manage the InstallState file.

--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/...


"4LetterState" <4LetterState@discussions.microsoft.com> wrote in message
news:119744EA-412E-488D-B21C-0A1D06AA8385@microsoft.com...
> Hello,
> I have an install package that has a custom action for the Install and
> Uninstall methods. Our application uses an Excel Add-in. During an
> uninstall,
> if Excel is open, I hit error 1306 as that application has my Add-in file
> locked. Instead of closing Excel, I choose to cancel the uninstall. At
> this
> point, my .InstallState file has already been deleted because the CA runs
> successfully before the REMOVEFILE action (where the 1306 error occurs).
>
> So, on the 2nd attempt to uninstall (with Excel closed), I am unable to
> remove the package because I have lost my .InstallState file and
> information.
> The uninstall custom action fails as a result of missing state
> information.
>
> I know how to correct the problem and get the package removed (MSIZAP).
> But, I would really like to know if it is possible to retain that State
> information until the very last moment in the uninstall. I have tried
> re-ordering events in the InstallExecuteSequence, but I can't have the
> Uninstall CA after the RemoveFiles action.
>
> Any ideas?
> Thanks,
> Brenda