Unix users are identified with a
UID and a
GID while Windows users are
identified with a SID.
Consequently all methods based on
UID or
GID fail on Windows:
os.userInfo().uid|gidreturn-1.fs.stat()'suidandgidreturn0.- The
processmethodsgetuid(),geteuid(),getgid(),getegid(),setuid(),seteuid(),setgid(),setegid(),getgroups(),setgroups()andinitgroups()throw an error. fs.chown()does not do anything.child_process'suidandgidoptions throw an error.
The privileged user is root on Unix and Administrator on Windows. Those are
triggered with different mechanisms.
One can use is-elevated (and
the related is-admin and
is-root) to check it on any OS.
The --secure-heap CLI
flag does not do anything on Windows.