当然 INSTALL 后 加个BAT 是可以的,我不太想这样干....
解决方案 »
- winform程序里,如何给datagridview设置linklable列??
- Winfrom DataGridView给单元格中的某个字加底色
- 如何将splitContainer中的panel设置为上下放置的(在属性面板中设置,非代码实现)
- 我要监控一个程序!然后模拟手工操作怎么写!
- 怎么在c#中开启本地计算机上的服务
- 100分请教ListView中CheckBox问题
- 散分:失恋,初恋刚刚结束!
- 求助 在windows service程序中使用MailSlot遇到的问题
- 新人报道~~再求一个C#方面的入门书籍~
- 在VS.Net中如何使注释生成已编译的HTML帮助文件?
- ?局域网中找出所有的机器???
- 用C#+FtpClient+winform实现ftp上传(200分了)谢谢
2. http://www.dotnet247.com/247reference/a.aspx?u=http://www.codeproject.com/dotnet/dotNETSCMDescription.asp
[assembly: Description("说明")]
ChangeServiceConfig2(hService,SERVICE_CONFIG_DESCRIPTION,(LPVOID)"你自己的描述");
public override void Install(IDictionary stateServer)
{
Microsoft.Win32.RegistryKey system,
currentControlSet,
services,
service,
config; try
{
base.Install(stateServer);
system = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("System");
currentControlSet = system.OpenSubKey("CurrentControlSet");
services = currentControlSet.OpenSubKey("Services");
service = services.OpenSubKey(this.serviceInstaller1.ServiceName, true);
service.SetValue("Description", "You Service Description");
service.SetValue("DisplayName", "You Service DisplayName");
config = service.CreateSubKey("Parameters");
}
catch(Exception e)
{
Console.WriteLine("An exception was thrown during service installation:\n" + e.ToString());
}
}
至于安装好服务以后马上Start,我也不知道,希望高人指点!