Add explaining comments for powershell scritps

This commit is contained in:
Sander Declerck 2026-01-19 16:25:50 +01:00
parent 641bfe9835
commit 09130c3294
No known key found for this signature in database

View file

@ -59,6 +59,8 @@ export async function installOnWindows() {
}
async function isRunningAsAdmin() {
// Uses Windows Security API to check if current process has admin privileges.
// Returns "True" or "False" as a string.
const result = await safeSpawn(
"powershell",
[
@ -79,6 +81,8 @@ function getWindowsArchitecture() {
}
async function uninstallIfInstalled() {
// Query Win32_Product via WMI to find the installed SafeChain Agent.
// If found, outputs the product GUID (e.g., "{12345678-1234-...}") needed for msiexec uninstall.
ui.writeVerbose(`Finding product code with PowerShell`);
let productCode;