c#制作类似制作类似qq安装程序一样的单文件程序安装包安装程序一样的单文件程序安装包
c#制作单文件安装程序,可安装windows服务,类似安装QQ,大家参考使用吧
复制代码 代码如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Xml;
using System.IO;
using System.IO.Compression;
using System.Resources;
using System.Net;
using System.Web.Services.Description;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace MON.Client
{
public partial class MainForm : Form
{
bool testFlag = false;
Dictionary<string, string> dic;
Thread t;
public MainForm()
{
InitializeComponent();
}
private void MainForm_Load(object sender, EventArgs e)
{
dic = new Dictionary<string, string>();
groupBox1.Visible = true;
groupBox2.Visible = false;
}
/// <summary>
/// 安装路径
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void InstallPathBTN_Click(object sender, EventArgs e)
{
DialogResult dr = FolerBrowserCreator.ShowDialog();
if (DialogResult.OK == dr)
{
InstallPathTB.Text = FolerBrowserCreator.SelectedPath;
if (dic.ContainsKey("installPath"))