用.net打包的安装程序,如何判断点击了取消安装 情况是这样的:我在安装的时候加了创建数据库和创建用户,这两个界面是自己加的另外弹出来的,如果在这两个界面弹出来的情况下,点击另外一个系统默认的安装进度的取消按钮达不到效果,也不会取消,界面又不会关闭,就死在那 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 点击“取消”不会触发Rollback 事件吗? If(MessageBox(hwnd,_T(""),_T(""),MB_YESNO)==IDNO){ MessageBox(hwnd,_T("你点击了取消!"),_T("Waring!"),MB_OK);}嗯,大致这样 弹出来的话 为什么不用ShowDialog 还让主页面可以点?在弹出页面里写个取消方法在主页面上调用 弹出的页面本来就是用的ShowDialog 你在开玩笑吧 安装页面 ShowDialog创建数据库 然后还可以点回安装页面? 创建Installer1.cs 文件,在里面把所有事件继承一次,然后把这个文件添加到打包工程中,在打包工程[用户界面编辑器]中,自己添加一个带有按钮的窗体,然后在Installer1.cs文件中访问那个按钮被按下就可以了[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)] public override void Rollback(IDictionary savedState) { base.Rollback(savedState); MessageBox.Show("Rollback"); } [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)] public override void Uninstall(IDictionary savedState) { base.Uninstall(savedState); MessageBox.Show("Rollback"); } protected override void OnAfterInstall(IDictionary savedState) { base.OnAfterInstall(savedState); MessageBox.Show("OnAfterInstall"); } protected override void OnAfterRollback(IDictionary savedState) { base.OnAfterRollback(savedState); MessageBox.Show("OnAfterRollback"); } protected override void OnAfterUninstall(IDictionary savedState) { base.OnAfterUninstall(savedState); MessageBox.Show("OnAfterUninstall"); } protected override void OnBeforeInstall(IDictionary savedState) { base.OnBeforeInstall(savedState); MessageBox.Show("OnBeforeInstall"); } protected override void OnBeforeRollback(IDictionary savedState) { base.OnBeforeRollback(savedState); MessageBox.Show("OnBeforeRollback"); } protected override void OnBeforeUninstall(IDictionary savedState) { base.OnBeforeUninstall(savedState); MessageBox.Show("OnBeforeUninstall"); } protected override void OnCommitted(IDictionary savedState) { base.OnCommitted(savedState); MessageBox.Show("OnCommitted"); } protected override void OnCommitting(IDictionary savedState) { base.OnCommitting(savedState); MessageBox.Show("OnCommitting"); } public void OutPutLog(string strMsg) { } 你要是动手试下,会发现用了ShowDialog了但是界面都会显示在底层,被系统默认的安装界面盖住 可以利用win32的api,在设置数据库的时候,把系统默认安装的界面隐藏掉,这样应该可以解决问题吧,但是具体做法不知道诶 addflow的一些问题,高手请进 算法对程序员的重要性 c# 实现ICOP 请帮帮忙!请问如何用c#读取“idVendor"和"idProduct"? 如何将ArrayList 转换成 string[] ? 急切求助,怎么做出一个像网络游戏在地图中走动的效果!谢谢各位啦! 关于windows身份验证 java项目自动转换为.net项目时遇到的问题。 从ButtonBase继承新类,使用默认构造函数,但始终报错---重载"ButtonBase"方法未获取"0"参数 为什么不能编译 TcpClient发送文件问题 WPF中dataGrid怎么显示dbml中表的数据
{
MessageBox(hwnd,_T("你点击了取消!"),_T("Waring!"),MB_OK);
}嗯,大致这样
在弹出页面里写个取消方法
在主页面上调用
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]
public override void Rollback(IDictionary savedState)
{
base.Rollback(savedState);
MessageBox.Show("Rollback");
} [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]
public override void Uninstall(IDictionary savedState)
{
base.Uninstall(savedState);
MessageBox.Show("Rollback");
} protected override void OnAfterInstall(IDictionary savedState)
{
base.OnAfterInstall(savedState);
MessageBox.Show("OnAfterInstall");
} protected override void OnAfterRollback(IDictionary savedState)
{
base.OnAfterRollback(savedState);
MessageBox.Show("OnAfterRollback");
} protected override void OnAfterUninstall(IDictionary savedState)
{
base.OnAfterUninstall(savedState);
MessageBox.Show("OnAfterUninstall");
} protected override void OnBeforeInstall(IDictionary savedState)
{
base.OnBeforeInstall(savedState);
MessageBox.Show("OnBeforeInstall");
} protected override void OnBeforeRollback(IDictionary savedState)
{
base.OnBeforeRollback(savedState);
MessageBox.Show("OnBeforeRollback");
} protected override void OnBeforeUninstall(IDictionary savedState)
{
base.OnBeforeUninstall(savedState);
MessageBox.Show("OnBeforeUninstall");
} protected override void OnCommitted(IDictionary savedState)
{
base.OnCommitted(savedState);
MessageBox.Show("OnCommitted");
} protected override void OnCommitting(IDictionary savedState)
{
base.OnCommitting(savedState);
MessageBox.Show("OnCommitting");
} public void OutPutLog(string strMsg)
{
}
你要是动手试下,会发现用了ShowDialog了但是界面都会显示在底层,被系统默认的安装界面盖住