Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Setup / January 2007

Tip: Looking for answers? Try searching our database.

Initiate Rollback from Custom Installation Class

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MrTea - 21 Dec 2006 16:55 GMT
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 - 22 Dec 2006 00:20 GMT
Try throwing an InstallException. That should do it.
Signature

Phil Wilson
[Microsoft MVP Windows Installer]

> Hi Folks
>
[quoted text clipped - 10 lines]
> Regards
> Jon
MrTea - 02 Jan 2007 17:28 GMT
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

> Try throwing an InstallException. That should do it.
> --
[quoted text clipped - 14 lines]
> > Regards
> > Jon
Phil Wilson - 02 Jan 2007 21:36 GMT
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.
Signature

Phil Wilson
[Microsoft MVP Windows Installer]

> Unfortunately that doesn't appear to have the desired effect.
>
[quoted text clipped - 25 lines]
>> > Regards
>> > Jon
MrTea - 05 Jan 2007 17:17 GMT
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
[quoted text clipped - 31 lines]
> >> > Regards
> >> > Jon

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.