建了一个Windows服务,然后在Setup里添加了主输出Installers(windows 服务)
内容文件是一个网站。但是我在Installers里的写了一个方法,然后在安装的时候没有弹出窗口阿,方法如下:public override void Install(IDictionary stateSaver)
        {
            MessageBox.Show("测试", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
        }

解决方案 »

  1.   

    windows服务默认是没有交互界面的,不过你可以设置
    http://www.cnblogs.com/ryan-world/archive/2010/06/10/1755228.html
      

  2.   


    那Windows Installer是安装服务啊(就是我要用的服务吧),但是我勾选了“允许服务与桌面交互”也没弹出窗口阿。
      

  3.   

    貌似是系统对此作了限制,参考下这个
    Windows Service下的MessageBox
      

  4.   

    意思就是 MessageBox.Show 不让用了,如果一定要弹框,要换另一个 API,如果只是测试部署是否成功,那就将一些信息写入文件,然后查看文件内容吧。