C#代码实现服务程序安装卸载

上传者: coldwind811201 | 上传时间: 2022-11-08 17:53:58 | 文件大小: 51KB | 文件类型: RAR
  程序演示了如何通过代码(不使用InstallUtil.exe)来对C#开发的Windows系统服务程序进行安装和卸载,使用了单独编写的安装程序,安装和卸载在线程中进行,带进度条,界面不锁死。   代码中的解决方案包括2个项目:系统服务程序为一简单的服务,每10秒在C:\log.txt文件内写入运行日志。服务程序内的Timer控件不能简单的从工具栏中拖入,拖入后需要更改代码使其成为System.Timers.Timer。安装程序直接生成文件于服务程序的Debug目录中,独立的安装和卸载按钮。 开发环境:Visual Studio 2010 DotNet版本:3.5

文件下载

资源详情

[{"title":"( 39 个子文件 51KB ) C#代码实现服务程序安装卸载","children":[{"title":"Install","children":[{"title":"frmMain.Designer.cs <span style='color:#111;'> 2.99KB </span>","children":null,"spread":false},{"title":"Install.csproj <span style='color:#111;'> 5.31KB </span>","children":null,"spread":false},{"title":"frmServiceStatus.cs <span style='color:#111;'> 4.53KB </span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"x86","children":[{"title":"Debug","children":[{"title":"Install.Properties.Resources.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"Install.frmServiceStatus.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"Install.pdb <span style='color:#111;'> 41.50KB </span>","children":null,"spread":false},{"title":"Install.frmMain.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.17KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"Install.csproj.FileListAbsolute.txt <span style='color:#111;'> 2.03KB </span>","children":null,"spread":false},{"title":"Install.exe <span style='color:#111;'> 12.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"frmServiceStatus.Designer.cs <span style='color:#111;'> 3.73KB </span>","children":null,"spread":false},{"title":"Install.csproj.user <span style='color:#111;'> 478B </span>","children":null,"spread":false},{"title":"frmServiceStatus.resx <span style='color:#111;'> 5.87KB </span>","children":null,"spread":false},{"title":"frmMain.cs <span style='color:#111;'> 3.25KB </span>","children":null,"spread":false},{"title":"frmMain.resx <span style='color:#111;'> 5.68KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"Resources.resx <span style='color:#111;'> 5.48KB </span>","children":null,"spread":false},{"title":"Settings.settings <span style='color:#111;'> 249B </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.33KB </span>","children":null,"spread":false},{"title":"Settings.Designer.cs <span style='color:#111;'> 1.06KB </span>","children":null,"spread":false},{"title":"Resources.Designer.cs <span style='color:#111;'> 2.79KB </span>","children":null,"spread":false}],"spread":true}],"spread":false},{"title":"AutoService.sln <span style='color:#111;'> 1.29KB </span>","children":null,"spread":false},{"title":"AutoService","children":[{"title":"bin","children":[{"title":"Debug","children":[{"title":"AutoService.exe <span style='color:#111;'> 7.00KB </span>","children":null,"spread":false},{"title":"Install.exe <span style='color:#111;'> 12.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Program.cs <span style='color:#111;'> 508B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"x86","children":[{"title":"Debug","children":[{"title":"AutoService.pdb <span style='color:#111;'> 27.50KB </span>","children":null,"spread":false},{"title":"AutoService.exe <span style='color:#111;'> 7.00KB </span>","children":null,"spread":false},{"title":"AutoService.ProjectInstaller.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"AutoService.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.50KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.01KB </span>","children":null,"spread":false},{"title":"AutoService.AutoService.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"ProjectInstaller.resx <span style='color:#111;'> 6.26KB </span>","children":null,"spread":false},{"title":"AutoService.Designer.cs <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"AutoService.resx <span style='color:#111;'> 6.05KB </span>","children":null,"spread":false},{"title":"ProjectInstaller.cs <span style='color:#111;'> 417B </span>","children":null,"spread":false},{"title":"AutoService.cs <span style='color:#111;'> 1.12KB </span>","children":null,"spread":false},{"title":"ProjectInstaller.Designer.cs <span style='color:#111;'> 2.18KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false}],"spread":true},{"title":"AutoService.csproj <span style='color:#111;'> 3.20KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明