问题1+3部分:自动安装SQL Server数据库
http://www.cnblogs.com/wangsaokui/articles/9769.aspx安装文件如何打包SQL数据库
http://community.csdn.net/Expert/TopicView.asp?id=3185458
http://www.cnblogs.com/wangsaokui/articles/9769.aspx安装文件如何打包SQL数据库
http://community.csdn.net/Expert/TopicView.asp?id=3185458
http://www.cnblogs.com/wangsaokui/articles/9669.aspx
方法二 加入到注册表HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
新建字符串值并进行设置
方法三 windows service启动后会在后台运行
using System;
using System.Collections;
using System.ComponentModel;
using System.Configuration.Install;
using System.ServiceProcess;namespace Xiaoxiao.MHFTPServer
{
[RunInstaller(true)]
public class Installer1 : System.Configuration.Install.Installer
{ private System.ComponentModel.Container components = null; private ServiceInstaller serviceInstaller;
private ServiceProcessInstaller processInstaller;
public Installer1()
{
InitializeComponent(); // TODO: Add any initialization after the InitComponent call
processInstaller = new ServiceProcessInstaller();
serviceInstaller = new ServiceInstaller();
// The services will run under the system account.
processInstaller.Account = ServiceAccount.LocalSystem;
// The services will be started manually.
serviceInstaller.StartType = ServiceStartMode.Automatic; // ServiceName must equal those on ServiceBase derived classes.
serviceInstaller.ServiceName = "MHFTPServer";
serviceInstaller.DisplayName="MYHome个人主页基地FTP服务"; // Add installers to collection. Order is not important.
Installers.Add(serviceInstaller);
Installers.Add(processInstaller);
} #region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion }
}
余题请参考楼上各位大虾的答案。
在WinForm中使用Web Services 来实现 软件 自动升级( Auto Update ) (C#)
http://blogs.coder.cn/skyover/archive/2004/06/07/485.aspx