installer1.cs

来自「不错的一个做的医院管理系统源码」· CS 代码 · 共 30 行

CS
30
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Diagnostics;

namespace Youzi
{
    [RunInstaller(true)]
    public partial class Installer1 : Installer
    {
        public Installer1()
        {
            InitializeComponent();
        }

        public override void Install(System.Collections.IDictionary stateSaver)
        {
            base.Install(stateSaver);
            Process p = new Process();
            p.StartInfo.FileName = "osql.exe";
            p.StartInfo.Arguments = string.Format(" -E -i \"{0}\"", this.Context.Parameters["TARGETDIR"] + "youzi.sql");
            p.Start();
            p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            p.WaitForExit();


        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?