Click here to Skip to main content
15,909,530 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have developed installer setup project. Here during installation I am using windows application as custom action. Here I will be shown "Cancel" button. If user clicks "Cancel" button or close the form the setup also should not be continue. Means setup also should be close when user canceling the installation in win form.

Please help me how to do?

Thanks.
Posted

Here's the solution

In case you need to rollback on a exception throw the install exception which will automatically rollback the setup.


VB
throw new InstallException("Missing database script file");
 
Share this answer
 
Comments
Member 7684075 23-Nov-11 9:59am    
Thanks Birajdar.

But how to send the exception to setup project from winform?
Please help me Birajdar.
Member 7684075 23-Nov-11 10:33am    
Hi Birajdar,

Its not stoping the setup continuation after getting error or canceling. It is running as usual. During instalation i am using winform. Suppose if i get error in winform the setup should be stop and should be rollback. so how to do?

now i am overriding the install method during installation. and how to pass the error message agin to setup. please guide me.
bbirajdar 23-Nov-11 10:36am    
No need to pass the error message to installer program. On the click of Cancel button in winapp, add the above code. It will rollback the installation
Member 7684075 24-Nov-11 1:56am    
No Birajdar. Its not rollback. and setup project installation will be complete even if error is occur in winform.
Hi Birajdar,

Its not stoping the setup continuation after getting error or canceling. It is running as usual. During instalation i am using winform. Suppose if i get error in winform the setup should be stop and should be rollback. so how to do?

now i am overriding the install method during installation. and how to pass the error message agin to setup. please guide me.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900