Hi yaradoddi,
As far as I know, we can only use the ways below to custom a Setup project:
1. Add a dialog which contains two radio buttons for users to select a condition value. This would have us be able to setup some of the files. This is the detail information:
http://msdn.microsoft.com/en-us/library/ecaca8zb(VS.80).aspx.
2. Add a custom action to show a message box to allow users to check something and decide if continue. This is a walk through:
http://msdn.microsoft.com/en-us/library/d9k65z2d(VS.80).aspx.
This is a sample about the custom Install class which would continue or stop uninstalling according to the user input:
[RunInstaller(true)]
public partial class DataBaseInstall : Installer
{
public override void Uninstall(IDictionary savedState)
{
if (MessageBox.Show("Do you want to uninstall the program.", "warning", MessageBoxButtons.OKCancel) == DialogResult.OK)
base.Uninstall(savedState);
else
return;
}
}
But via this method, we cannot decide whether the uninstall process is started by a uninstall request or a install request. Another issue is that when we stop the uninstalling process, the install process would still start in the next step.
I have two ideas to achieve a similar goal:
1. We can install/uninstall a program in the user interface of the application. For example, we can add a update menu item to the main menu of the application. When user clicks the menu, we can popup a message box to have the user check whether to update.
2. We can use other tools to produce setup package, such as WIX, or ClickOnce.
WIX: http://msdn.microsoft.com/en-us/library/aa302186.aspx.
ClickOnce: http://msdn.microsoft.com/en-us/library/t71a733d(VS.80).aspx.
Let me know it these ideas helps.
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.