]>
| Commit | Line | Data |
|---|---|---|
| 3c096107 MV |
1 | # dotfiles |
| 2 | ||
| 3 | Windows development-box provisioning scripts. | |
| 4 | ||
| 5 | `setup-windows.bat` takes a fresh Windows install to a working C++ / native | |
| 6 | development environment: editors and shells, Python, the Visual Studio 2022 | |
| 7 | toolchain (including the Clang and Windows XP targeting toolsets), the Windows | |
| 8 | Driver Kit, and a handful of analysis tools (Sysinternals, OpenCppCoverage, | |
| 9 | BinSkim, the Windows Performance Toolkit). | |
| 10 | ||
| 11 | ## Files | |
| 12 | ||
| 13 | | File | Purpose | | |
| 14 | | --- | --- | | |
| 15 | | `setup-windows.bat` | Entry point. Runs the non-elevated, per-user half (winget installs, user `PATH` edits, global git config), then launches the elevated half and prints its log. | | |
| 16 | | `setup-windows-with-uac.ps1` | The elevated half, started via UAC by the batch file. Enables `ssh-agent`, installs Visual Studio 2022 Community with the required components, the WDK, and the Windows Performance Toolkit. Can also be run directly from an Administrator prompt. | | |
| 17 | ||
| 18 | ## Usage | |
| 19 | ||
| 20 | 1. **Edit `setup-windows.bat` first.** The global git identity near the middle of | |
| 21 | the file is placeholder text: | |
| 22 | ||
| 23 | ```bat | |
| 24 | git config --global user.name "PLACEHOLDER_NAME" | |
| 25 | git config --global user.email "PLACEHOLDER_EMAIL" | |
| 26 | ``` | |
| 27 | ||
| 28 | Substitute your own name and email, or comment both lines out to keep your | |
| 29 | identity per-repository. | |
| 30 | ||
| 31 | 2. Run it from a normal (non-elevated) prompt: | |
| 32 | ||
| 33 | ```bat | |
| 34 | setup-windows.bat | |
| 35 | ``` | |
| 36 | ||
| 37 | It will raise a single UAC prompt for the elevated half. Accept it — declining | |
| 38 | leaves Visual Studio and the WDK uninstalled, and the script says so. | |
| 39 | ||
| 40 | 3. Restart your shell afterwards so the updated user `PATH` is picked up, and | |
| 41 | reboot if a step reported that a restart was required. | |
| 42 | ||
| 43 | ## Notes | |
| 44 | ||
| 45 | - The elevated half writes a transcript to `setup-windows-uac.log` next to the | |
| 46 | script; the batch file prints it when the elevated window closes. The log is | |
| 47 | gitignored, as it contains local paths. | |
| 48 | - Both halves are idempotent — re-running skips anything already installed. | |
| 49 | - Visual Studio is installed in three labelled passes (base workload, Clang/LLVM, | |
| 50 | XP toolset) so a failure identifies which component group is responsible. | |
| 51 | - The scripts were extracted from a native Windows project, so the component | |
| 52 | selection is tuned for that: Spectre-mitigated runtimes, the v141/XP toolset, | |
| 53 | and driver-kit headers. Trim the component lists in the `.ps1` if you don't | |
| 54 | need them — each group is a plain array near the top. |