Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Error Rolling Back Setup (Installer Class(deployment))

Error Rolling Back Setup (Installer Class(deployment))

Scheduled Pinned Locked Moved C#
helpcsharpsysadminwindows-adminalgorithms
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    abhinish
    wrote on last edited by
    #1

    hi guys! need some help. i m deploying a .net application using the .net setup project and also using the installer class to add some custom actions every thing is running fine.. but i want to rollback the setup if a condition does not matches.. for which i m using the base.rollback(isavedstate) method but it gives an exception that "savedstate might be corrupted" and then rollback the setup from the catch block.. i m searching for it from a long time but couldnt figured it out. can any one tell me what i m missing.. i wrote the code some what like this: protected override void OnBeforeInstall(IDictionary savedState) { base.OnBeforeInstall (savedState); try { if(DialogResult.No==(MessageBox.Show("This Setup Will restart your Internet Infromation Service Mannager(IIS). Do you want to Continue ? ","Alert",MessageBoxButtons.YesNo,MessageBoxIcon.Hand))) { base.Rollback(savedState); return; } } catch(InstallException iex) {this.Rollback(savedState); } catch(Exception ex) {this.Rollback(savedState); } } but it gets rollback in the catch block gining the error. abhinav

    abhinav

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups