Publish reviewed history-free open-source snapshot (2026-10-12)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
|
||||
namespace UCVL.VPNPlus;
|
||||
|
||||
// Fixed executable and working directory: never inherit NSIS's temporary payload.
|
||||
internal static class SystemPowerShell
|
||||
{
|
||||
internal static ProcessStartInfo CreateStartInfo(string script) => new()
|
||||
{
|
||||
FileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System),
|
||||
"WindowsPowerShell", "v1.0", "powershell.exe"),
|
||||
WorkingDirectory = Environment.GetFolderPath(Environment.SpecialFolder.System),
|
||||
Arguments = "-NoProfile -NonInteractive -EncodedCommand "
|
||||
+ Convert.ToBase64String(Encoding.Unicode.GetBytes(script)),
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true,
|
||||
WindowStyle = ProcessWindowStyle.Hidden,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user