Harsh Suman
Harsh Suman

Reputation:

Stopping installer inbetween

I want to stop my installer in progress programmatically through my installer class. I want to do this in before install event handler.However when I call Rollback(),I do not know the IDictionary SavedState to pass as parameter.I am passing it as null due to which the rollback is throwing an exception.Does anyone know how to halt the installer from running programmatically?.

Upvotes: 1

Views: 205

Answers (1)

Kane
Kane

Reputation: 16802

If you are creating a setup project as part of Visual Studio you should be able to add a custom action into various parts of the installer. Within the custom action you can write code to achieve your result. MSDN Link

Upvotes: 1

Related Questions