Nefarius.Tools.WDKWhere
1.4.0
Prefix Reserved
See the version list below for details.
dotnet tool install --global Nefarius.Tools.WDKWhere --version 1.4.0
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local Nefarius.Tools.WDKWhere --version 1.4.0
#tool dotnet:?package=Nefarius.Tools.WDKWhere&version=1.4.0
nuke :add-package Nefarius.Tools.WDKWhere --version 1.4.0
Nefarius.Tools.WDKWhere
CLI tool that resolves Windows SDK installation paths.
Motivation
This meeting could've been an email!
And this tool could've been a shell script 😅 wdkwhere
was inspired by
vswhere
but for locating
the Windows SDK installation folders instead.
The SDK hosts quite a few nifty everyday developer binaries like signtool
which by default are not easily invokable on
the Terminal or in scripts since their respective directories are all not added to e.g. the PATH
environment variable.
Granted, this could be somewhat automated via registry queries in PowerShell or even the CMD, or Python/VBS scripts and alike, but why not use a nice language like C# and make it a dotnet tool instead!
Installation
dotnet tool install --global Nefarius.Tools.WDKWhere
Usage examples
To display the help text and see all available flags run either
wdkwhere query --help
orwdkwhere run --help
orwdkwhere open --help
Basic usage
Calling wdkwhere
without arguments simply returns the bin
directory for the latest local WDK version and the current
operating system architecture (most likely X64
):
PS C:\Users\Administrator> wdkwhere
C:\Program Files (x86)\Windows Kits\10\Bin\10.0.22621.0\X64
PS C:\Users\Administrator>
Advanced usage
You can also directly run applications shipped with the WDK by using the run
verb; here's how to verify a PE file
signature with signtool
and without having to deal with the installation path whatsoever:
PS C:\Users\Administrator> wdkwhere run signtool verify /pa /v C:\Windows\System32\consent.exe
Verifying: C:\Windows\System32\consent.exe
Signature Index: 0 (Primary Signature)
Hash of file (sha256): 829722E8F4EC6297337F26527AC4BB38D375605A0B36CF32988BDA0735ACF2C3
Signing Certificate Chain:
...truncated...
Successfully verified: C:\Windows\System32\consent.exe
Number of files successfully Verified: 1
Number of warnings: 0
Number of errors: 0
PS C:\Users\Administrator>
Both stdout
and stderr
of the invoked application are redirected to the current Terminal session and the exit code
of the wdkwhere
process is set to the invoked command exit code, so behaviour in scripts is basically unaltered to
running the commands directly.
3rd party credits
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last updated | |
---|---|---|---|
1.4.1 | 71 | 11/24/2024 | |
1.4.0 | 75 | 11/24/2024 | |
1.3.2 | 76 | 11/24/2024 | |
1.3.1 | 68 | 11/24/2024 | |
1.3.0 | 77 | 11/24/2024 | |
1.2.0 | 131 | 11/3/2024 | |
1.1.3 | 85 | 10/28/2024 | |
1.1.2 | 118 | 9/17/2024 | |
1.1.1 | 93 | 9/17/2024 | |
1.1.0 | 96 | 9/17/2024 | |
1.0.0 | 105 | 9/16/2024 | |
1.0.0-pre005 | 79 | 9/16/2024 | |
1.0.0-pre004 | 80 | 9/16/2024 | |
1.0.0-pre003 | 72 | 9/16/2024 |