Skip to content

Commit

Permalink
Add C:\Windows\System32\CompatTel to search path
Browse files Browse the repository at this point in the history
  • Loading branch information
lostindark committed Apr 24, 2019
1 parent db00308 commit 3e73137
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Rapr/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.IO;
using System.Reflection;
using System.Windows.Forms;

Expand All @@ -24,12 +25,20 @@ private static Assembly ResolveEventHandler(object sender, ResolveEventArgs args
}
}

private static void AddEnvironmentPaths(string path)
{
var paths = new[] { Environment.GetEnvironmentVariable("PATH") ?? string.Empty, path };
string newPath = string.Join(Path.PathSeparator.ToString(), paths);
Environment.SetEnvironmentVariable("PATH", newPath);
}

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
public static void Main()
{
AddEnvironmentPaths(@"C:\Windows\System32\CompatTel");
AppDomain.CurrentDomain.AssemblyResolve += ResolveEventHandler;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down

0 comments on commit 3e73137

Please sign in to comment.