Initial Firefox secure vault
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
internal static class FirefoxLauncher
|
||||
{
|
||||
private static int Main()
|
||||
{
|
||||
string baseDir = AppDomain.CurrentDomain.BaseDirectory;
|
||||
string scriptPath = Path.Combine(baseDir, "FirefoxSessionVault.ps1");
|
||||
|
||||
if (!File.Exists(scriptPath))
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
var startInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = "powershell.exe",
|
||||
Arguments = "-NoProfile -Sta -ExecutionPolicy Bypass -WindowStyle Hidden -File \"" + scriptPath + "\" -Mode Toggle",
|
||||
WorkingDirectory = baseDir,
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true,
|
||||
WindowStyle = ProcessWindowStyle.Hidden
|
||||
};
|
||||
|
||||
Process.Start(startInfo);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user