# systemTool

<!-- https://uncage.vercel.app/docs/api/protocol/node/functions/systemtool/ -->

```ts
function systemTool(name, o?): string;
```

Defined in: node/exe.ts:187

The absolute path of a Windows system tool: `%SystemRoot%\System32\<name>.exe` (PowerShell:
`…\System32\WindowsPowerShell\v1.0\powershell.exe`), with `C:\Windows` when `SystemRoot` /
`windir` is unset or not absolute. Started by bare name, Windows would look in the current
directory first (a planted `schtasks.exe` in a checkout would run). Other platforms: `name` unchanged.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `name` | [`SystemToolName`](https://uncage.vercel.app/docs/api/protocol/node/type-aliases/systemtoolname.md) |
| `o?` | \{ `env?`: `ProcessEnv`; `platform?`: `Platform`; \} |
| `o.env?` | `ProcessEnv` |
| `o.platform?` | `Platform` |

## Returns

`string`
