Hi All
I have a C# application which checks the locale of the system and runs the particular SQL server installer using the following code:
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
How to set errors?
Started by
s26f84
, Jan 14 2008 23:11
2 replies to this topic
Posted 14 January 2008 - 23:11
CODE |
try{ System.Diagnostics.Process installProcess = new System.Diagnostics.Process(); installProcess.StartInfo.FileName = installApp; installProcess.StartInfo.Arguments = installArgs; // Start the SQL Express installed installProcess.Start(); // Wait for the SQl Express installer to complete installProcess.WaitForExit(); // Check for sucessful completion return (installProcess.ExitCode == 0) ? true : false; }Catch (Exception) { // sets the environment exit code to 1935 but it does not work System.Environment.ExitCode = 1935; } |
the problem is tht exception handling is not working and i have following issues:
1. when there is error in SQL installer my C# application keeps on waiting for the installer to exit.
2. if it fails i want that the prerequisite dialog (installshield) knows there is error and exits the installation.
it would be great if someone can shed some light on the above issues. you time is highly appreciated
thanks
sunny
Edited by s26f84, 20 January 2008 - 22:26.
Posted 18 January 2008 - 11:37
First; the angry face isn't really a good motivator for getting replies..
why don't you just include the SQL express merge module in your project?
why don't you just include the SQL express merge module in your project?
Posted 20 January 2008 - 23:24
QUOTE (MrSensitive @ 2008-01-18 11:37) |
First; the angry face isn't really a good motivator for getting replies.. why don't you just include the SQL express merge module in your project? |
changed the post icon and thanks alot for replying.
http://msdn2.microso...y/ms345154.aspx
according to msdn merge module is not supported by sql server 2005 express edition.
the oonly wayout is could see was the one i have implemented. i have tested my application. it works fine but when error occurs, it sets System.Environment.ExitCode, which is not working in installshield.
please help me in understandin how to set the errors in c#, which can be seen by installshield. so that i can halt the installation if any error occurs during execution of my application.
waitin for reply again...