fix(shell): preserve Windows launcher paths and elevation arguments
macOS QQ runtime / runtime (arm64, macos-15) (push) Canceled after 0s
macOS QQ runtime / runtime (x64, macos-15-intel) (push) Canceled after 0s
Windows launcher / launchers (push) Canceled after 0s
Release Tag / validate-version (push) Canceled after 0s
Release Tag / trigger-release (push) Canceled after 0s
macOS native compatibility / native (arm64, macos-15) (push) Canceled after 0s
macOS native compatibility / native (x64, macos-15-intel) (push) Canceled after 0s
macOS QQ runtime / runtime (arm64, macos-15) (push) Canceled after 0s
macOS QQ runtime / runtime (x64, macos-15-intel) (push) Canceled after 0s
Windows launcher / launchers (push) Canceled after 0s
Release Tag / validate-version (push) Canceled after 0s
Release Tag / trigger-release (push) Canceled after 0s
macOS native compatibility / native (arm64, macos-15) (push) Canceled after 0s
macOS native compatibility / native (x64, macos-15-intel) (push) Canceled after 0s
This commit is contained in:
1 parent
f8786c65de
commit
ff9a829e29
8 files changed
+210
-23
No files matched your search
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
public class NapCatLauncherAudit {
|
||||
public static int Main(string[] arguments) {
|
||||
string name = Path.GetFileNameWithoutExtension(Process.GetCurrentProcess().MainModule.FileName);
|
||||
if (name == "reg") {
|
||||
string uninstall = Environment.GetEnvironmentVariable("NAPCAT_AUDIT_UNINSTALL");
|
||||
if (String.IsNullOrEmpty(uninstall)) return 1;
|
||||
Console.OutputEncoding = new UTF8Encoding(false);
|
||||
Console.WriteLine(" UninstallString REG_SZ " + uninstall);
|
||||
return 0;
|
||||
}
|
||||
if (name == "net") return Int32.Parse(Environment.GetEnvironmentVariable("NAPCAT_AUDIT_NET_STATUS"));
|
||||
string output = Environment.GetEnvironmentVariable("NAPCAT_AUDIT_OUTPUT");
|
||||
using (StreamWriter writer = new StreamWriter(output, false, new UTF8Encoding(false))) {
|
||||
writer.WriteLine(name);
|
||||
foreach (string argument in arguments) writer.WriteLine(Convert.ToBase64String(Encoding.UTF8.GetBytes(argument)));
|
||||
}
|
||||
return Int32.Parse(Environment.GetEnvironmentVariable("NAPCAT_AUDIT_BOOT_STATUS") ?? "0");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user