Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Deployment project: How to Call CustomRollback action from Custom install action.
 

Deployment project: How to Call CustomRollback action from Custom install action.

I have a MSI deployment project, I have added Custom Install, remove ,rollback actions in dll. Inside custom install action I am checking some condition ,according to result of the condition I need to rollback the installation. My question is how i will call the roll back action. I saw in some where that we can use

throw

new InstallException("ERROR_MESSAGE");

but this statements gives lot of error like:
install.cpp(222) : error C2061: syntax error : identifier 'InstallException'
install.cpp(225) : error C2143: syntax error : missing ';' before '}'
install.cpp(225) : error C2143: syntax error : missing ';' before '}'
install.cpp(225) : error C2143: syntax error : missing ';' before '}'
install.cpp(225) : error C2143: syntax error : missing ';' before '}'
install.cpp(225) : error C2143: syntax error : missing ';' before '}'
install.cpp(225) : error C2143: syntax error : missing ';' before '}'
install.cpp(225) : error C2143: syntax error : missing ';' before '}'
install.cpp(225) : error C2143: syntax error : missing ';' before '}'


can you help me to figure out what i am doing wrong....

Birajendu  Friday, July 24, 2009 6:26 AM
You're probably missing a using reference, something ike using System.Configuration.Install if this was C#. It's no different to any other syntax error you get if you haven't added a reference to an assembly or add a using declaration.

Phil Wilson
PhilWilson  Friday, July 24, 2009 10:37 PM
You're probably missing a using reference, something ike using System.Configuration.Install if this was C#. It's no different to any other syntax error you get if you haven't added a reference to an assembly or add a using declaration.

Phil Wilson
PhilWilson  Friday, July 24, 2009 10:37 PM

You can use google to search for other answers

Custom Search

More Threads

• Exception occurred while initializing the installation: System.BadImageFormatException: The format of the file '<myfilename> is invalid..
• Custom ClickOnce uninstall tasks
• The referenced assembly is not installed on your system error with ClickOnce installation
• Setup project files
• ActivationUri file://unc_path
• Installing pre-requisites using low-level users (2005)
• Is it possible to change the program.exe.config file after a Publish
• Smart device deployment with resource files
• Multiple File copy to Web Server
• Windows Form hosted in IE with 3rd Party Controls