mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Add explaining comments for powershell scritps
This commit is contained in:
parent
c200ea56cf
commit
da6c022ef4
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue