Launcher.cs
|
using System; using System.Diagnostics; using System.IO; using System.Reflection; class Program { static void Main() { string exeDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string scriptPath = Path.Combine(exeDir, "PSModulePath-Manager.ps1"); ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName = "pwsh.exe"; psi.Arguments = "-NoProfile -ExecutionPolicy Bypass -File \"" + scriptPath + "\""; psi.WindowStyle = ProcessWindowStyle.Hidden; psi.CreateNoWindow = true; psi.UseShellExecute = false; Process.Start(psi); } } |