110,561
社区成员
发帖
与我相关
我的任务
分享
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
string path = "C:\\Windows\\System32\\";
string dllFileName = "Soft.dll";
//判断是什么系统 6是win7
if (Environment.OSVersion.Version.Major == 6)
{
//加载Soft.dll
if (!File.Exists(path + dllFileName)) //文件不存在
{
FileStream fs = new FileStream(path + dllFileName, FileMode.CreateNew, FileAccess.Write);
byte[] buffer = Properties.Resources.Soft;
fs.Write(buffer, 0, buffer.Length);
fs.Close();
}
}
//
Application.Run(new MainForm());