你要做一个自动更新程序是吗!
看看这个过程 private void CheckUpdates()
        {
            MainProject.status_ActionNotice.Text = "正在检测是否需要更新...";
            btnLogin.Enabled = false;            if (IsNeedUpdated())
            {
                try
                {
                    Process.Start("AutoUpdate.exe");
                }
                catch (Exception ex)
                {
                    MessageBox.Show("升级程序错误:" + ex.Message, ERROR_TITLE);
                }
                Process.GetCurrentProcess().Kill();            }            MainProject.status_ActionNotice.Text = "检测完成,不需要更新.";
            btnLogin.Enabled = true;
        }        private bool IsNeedUpdated()
        {
            string localXmlFile = Application.StartupPath + "\\Update.xml";
            string serverXmlFile = string.Empty;            XmlFiles updaterXmlFiles = null;            try
            {
                //从本地读取更新配置文件信息
                updaterXmlFiles = new XmlFiles(localXmlFile);
            }
            catch
            {
                MessageBox.Show("配置文件出错!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return false;
            }
            //获取服务器地址
            string updateUrl = updaterXmlFiles.GetNodeValue("//Url");            AppUpdater appUpdater = new AppUpdater();
            appUpdater.UpdaterUrl = updateUrl + "/UpdateList.xml";            //与服务器连接,下载更新配置文件
            string tempUpdatePath = string.Empty;
            try
            {
                tempUpdatePath = Environment.GetEnvironmentVariable("Temp") + "\\" + "_" + updaterXmlFiles.FindNode("//Application").Attributes["applicationId"].Value + "_" + "y" + "_" + "x" + "_" + "m" + "_" + "\\";
                appUpdater.DownAutoUpdateFile(tempUpdatePath);
            }
            catch
            {
                MessageBox.Show("与服务器连接失败,操作超时!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return false;            }            serverXmlFile = tempUpdatePath + "\\Update.xml";
            if (!File.Exists(serverXmlFile))
            {
                return false;
            }            int availableUpdate = appUpdater.CheckForUpdate(serverXmlFile, localXmlFile);
            return (availableUpdate > 0);
        }
希望给你点启示

解决方案 »

  1.   

    在你的工程下新建一个项目,输出类型选择class library然后处理代码逻辑
      

  2.   

    VS2005没用过,直接从6.0到9.0。
    用VS2008或以上吧,创建配置服务特简单,点两下写业务就行了。再看一下制作windows服务的安装包就结了。
      

  3.   

    三楼我要做的是   在winlogon 的时候启动我的程序,我的程序是一个快速输入的东西,比如点下鼠标会出现一串字符,我想再输入登录密码的时候,我点下鼠标就自动输入了一串密码,明白了吗
    我程序写好了,但怎么在登录的时候挂起来我程序
      

  4.   

    Winlogon前启动程序是可以,服务就可以,不过不能用户交互(桌面不一样)。
    要交互则(难度不小,托管代码可能不可以):
    XP: 改写GINA
    Vista/Win7:写Credential Provider
      

  5.   

    还在吗,我的问题,很简单呀,我只需要在winlogon的时候吧我的EXE程序启动起来能用就可以了!
      

  6.   

    如果你能在Winlogon的界面任意运行程序,它还叫‘安全桌面(Secure Desktop)’吗?
      

  7.   


    我系统是 win7的  有没有办法在winlogon界面启动程序吗,我看好多东西看的我迷糊!