[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.setup

Initiate Rollback from Custom Installation Class

MrTea

12/21/2006 4:56:00 PM

Hi Folks

I have a Custom Installation Class (that inherits from
System.Configuration.Install.Installer)

Basically during a file copy, if it errors I want to roll-back the
installation.

Can I initiate the roll-back from within my custom installation class.

The error I am trying to catch is during my overridden Commit Sub.

Regards
Jon

4 Answers

Phil Wilson

12/22/2006 12:20:00 AM

0

Try throwing an InstallException. That should do it.
--
Phil Wilson
[Microsoft MVP Windows Installer]
"MrTea" <hilton.jon@gmail.com> wrote in message
news:1166720147.295914.17030@80g2000cwy.googlegroups.com...
> Hi Folks
>
> I have a Custom Installation Class (that inherits from
> System.Configuration.Install.Installer)
>
> Basically during a file copy, if it errors I want to roll-back the
> installation.
>
> Can I initiate the roll-back from within my custom installation class.
>
> The error I am trying to catch is during my overridden Commit Sub.
>
> Regards
> Jon
>


MrTea

1/2/2007 5:28:00 PM

0

Unfortunately that doesn't appear to have the desired effect.

It throws up an exception message and says that installation will
continue but the application will not function as you might expect.

Any more ideas would be very welcome, I just need to figure out how to
abort the installation and rollback (from a Custom Installer Class)

Regards
Jon

On Dec 22 2006, 12:20 am, "Phil Wilson"
<phil.wil...@wonderware.something.com> wrote:
> Try throwing an InstallException. That should do it.
> --
> Phil Wilson
> [Microsoft MVP Windows Installer]"MrTea" <hilton....@gmail.com> wrote in messagenews:1166720147.295914.17030@80g2000cwy.googlegroups.com...
>
> > Hi Folks
>
> > I have a Custom Installation Class (that inherits from
> > System.Configuration.Install.Installer)
>
> > Basically during a file copy, if it errors I want to roll-back the
> > installation.
>
> > Can I initiate the roll-back from within my custom installation class.
>
> > The error I am trying to catch is during my overridden Commit Sub.
>
> > Regards
> > Jon

Phil Wilson

1/2/2007 9:36:00 PM

0

It's because you're in the Commit method - that means the installation
transaction is finished. That's what Commit means. If you want it to roll
back you need to be in the Install method.
--
Phil Wilson
[Microsoft MVP Windows Installer]
"MrTea" <hilton.jon@gmail.com> wrote in message
news:1167758887.500674.73790@h40g2000cwb.googlegroups.com...
> Unfortunately that doesn't appear to have the desired effect.
>
> It throws up an exception message and says that installation will
> continue but the application will not function as you might expect.
>
> Any more ideas would be very welcome, I just need to figure out how to
> abort the installation and rollback (from a Custom Installer Class)
>
> Regards
> Jon
>
> On Dec 22 2006, 12:20 am, "Phil Wilson"
> <phil.wil...@wonderware.something.com> wrote:
>> Try throwing an InstallException. That should do it.
>> --
>> Phil Wilson
>> [Microsoft MVP Windows Installer]"MrTea" <hilton....@gmail.com> wrote in
>> messagenews:1166720147.295914.17030@80g2000cwy.googlegroups.com...
>>
>> > Hi Folks
>>
>> > I have a Custom Installation Class (that inherits from
>> > System.Configuration.Install.Installer)
>>
>> > Basically during a file copy, if it errors I want to roll-back the
>> > installation.
>>
>> > Can I initiate the roll-back from within my custom installation class.
>>
>> > The error I am trying to catch is during my overridden Commit Sub.
>>
>> > Regards
>> > Jon
>


MrTea

1/5/2007 5:17:00 PM

0

You're right! That sorted it

Thanks

On Jan 2, 9:36 pm, "Phil Wilson" <phil.wil...@wonderware.something.com>
wrote:
> It's because you're in the Commit method - that means the installation
> transaction is finished. That's what Commit means. If you want it to roll
> back you need to be in the Install method.
> --
> Phil Wilson
> [Microsoft MVP Windows Installer]"MrTea" <hilton....@gmail.com> wrote in messagenews:1167758887.500674.73790@h40g2000cwb.googlegroups.com...
>
> > Unfortunately that doesn't appear to have the desired effect.
>
> > It throws up an exception message and says that installation will
> > continue but the application will not function as you might expect.
>
> > Any more ideas would be very welcome, I just need to figure out how to
> > abort the installation and rollback (from a Custom Installer Class)
>
> > Regards
> > Jon
>
> > On Dec 22 2006, 12:20 am, "Phil Wilson"
> > <phil.wil...@wonderware.something.com> wrote:
> >> Try throwing an InstallException. That should do it.
> >> --
> >> Phil Wilson
> >> [Microsoft MVP Windows Installer]"MrTea" <hilton....@gmail.com> wrote in
> >> messagenews:1166720147.295914.17030@80g2000cwy.googlegroups.com...
>
> >> > Hi Folks
>
> >> > I have a Custom Installation Class (that inherits from
> >> > System.Configuration.Install.Installer)
>
> >> > Basically during a file copy, if it errors I want to roll-back the
> >> > installation.
>
> >> > Can I initiate the roll-back from within my custom installation class.
>
> >> > The error I am trying to catch is during my overridden Commit Sub.
>
> >> > Regards
> >> > Jon