Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

windowsSystem.ts

8 lines498 Bytes

1// Effect-free so the standalone service launcher can use it.
2​
3/** Windows system tools are run by absolute path, independent of PATH and the working directory. */
4export const windowsSystem32Path = (env: NodeJS.ProcessEnv, executable: string) =>
5 `${env.SystemRoot || env.SYSTEMROOT || env.windir || String.raw`C:\Windows`}\\System32\\${executable}`;
6​
7export const windowsPowerShellPath = (env: NodeJS.ProcessEnv) =>
8 windowsSystem32Path(env, String.raw`WindowsPowerShell\v1.0\powershell.exe`);