Skip to content

feat: added user entry on output. Now it shows what user started a specific process#53

Merged
supervoidcoder merged 9 commits intomainfrom
show-user
Jan 27, 2026
Merged

feat: added user entry on output. Now it shows what user started a specific process#53
supervoidcoder merged 9 commits intomainfrom
show-user

Conversation

@supervoidcoder
Copy link
Owner

@supervoidcoder supervoidcoder commented Jan 27, 2026

works

Summary by CodeRabbit

  • New Features

    • Process inspection now displays the user name for each process, making ownership easier to identify; output is colorized when the terminal supports it for clearer reading.
  • Tests

    • Minor formatting update to the process test batch file (trailing space and newline).

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Walkthrough

Adds GetUserNameFromProcess(DWORD) to obtain a process owner's username via OpenProcess, OpenProcessToken, GetTokenInformation, and LookupAccountSidW; integrates this into PIDinspect to print the process owner or "N/A" on failure.

Changes

Cohort / File(s) Summary
Feature Implementation
main.cpp
Adds std::optional<std::wstring> GetUserNameFromProcess(DWORD id) (opens process, retrieves token, obtains user SID, calls LookupAccountSidW) and integrates the call into PIDinspect() to print owner (with VT color handling) or "N/A" on failure.
Test Update (formatting)
tests/process/process.bat
Minor formatting change: final line now ends with a trailing space and an added newline at EOF.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant App as PIDinspect (app)
participant Kernel as Windows Kernel/API
participant TokenAPI as Token APIs (OpenProcessToken / GetTokenInformation)
participant SIDsvc as SID Resolution (LookupAccountSidW)
App->>Kernel: OpenProcess(pid, PROCESS_QUERY_LIMITED_INFORMATION)
Kernel-->>App: process handle / error
App->>TokenAPI: OpenProcessToken(processHandle)
TokenAPI-->>App: token handle / error
App->>TokenAPI: GetTokenInformation(TokenUser) -> SID
TokenAPI-->>App: user SID / error
App->>SIDsvc: LookupAccountSidW(SID)
SIDsvc-->>App: username/domain or failure
App->>App: print username (or "N/A")

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hop to a handle, nose to the trace,
I chase down a SID with delicate grace.
From token to name, I nudge and I pry,
Revealing the owner beneath Windows' sky. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: added user entry on output. Now it shows what user started a specific process' accurately describes the main change: integrating user name resolution into the process inspection output to display which user started a process.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@supervoidcoder
Copy link
Owner Author

hey @coderabbitai, i got it to work, but the output's a bit SUSPICIOUS :suspect:

Running test: D:\a\win-witr\win-witr\tests\help\help.bat
D:\a\win-witr\win-witr>win-witr
win-witr - Why is this running? Windows version by supervoidcoder.
Running with elevated privileges (Admin).
Usage: win-witr [options]
Options:
-h, --help Show this help message and exit
-v, --version Show version information and exit
--port Specify the port to check
--pid Specify the PID to check
Specify the process name to check
D:\a\win-witr\win-witr>win-witr -h
win-witr - Why is this running? Windows version by supervoidcoder.
Running with elevated privileges (Admin).
Usage: win-witr [options]
Options:
-h, --help Show this help message and exit
-v, --version Show version information and exit
--port Specify the port to check
--pid Specify the PID to check
Specify the process name to check
D:\a\win-witr\win-witr>win-witr --help
win-witr - Why is this running? Windows version by supervoidcoder.
Running with elevated privileges (Admin).
Usage: win-witr [options]
Options:
-h, --help Show this help message and exit
-v, --version Show version information and exit
--port Specify the port to check
--pid Specify the PID to check
Specify the process name to check
Running test: D:\a\win-witr\win-witr\tests\pid\pid.bat
D:\a\win-witr\win-witr>win-witr --pid 4
Error: Unable to query executable path. Error code: 31
PID specified: 4
Maybe Access is Denied or the process is running entirely in RAM.
Hint: This error indicates a driver error, but in win-witr, it often means you are calling a pseudo-process, such as System, Registry, or other processes that only exist in RAM as a kernel process. It is often easy to tell them apart if they lack a .exe extension.
User: N/A (Failed to access info)
Why It Exists:
Secure System (PID 92)
└─ Registry (PID 132)
└─ smss.exe (PID 516)
Started: 5 minutes ago (Tue 2026-01-27 03:22:01 +0000)
Running test: D:\a\win-witr\win-witr\tests\process\process.bat
D:\a\win-witr\win-witr>win-witr winlogon.exe
Process Name specified: winlogon.exe (PID 6936)
Executable Path: C:\Windows\System32\winlogon.exe
User: SYSTEM
Why It Exists:
winlogon.exe (PID 6936) ⬅
└─ fontdrvhost.exe (PID 7052)
└─ dwm.exe (PID 7064)
Started: 5 minutes ago (Tue 2026-01-27 03:22:37 +0000)
D:\a\win-witr\win-witr>win-witr lsass.exe
Process Name specified: lsass.exe (PID 992)
Executable Path: C:\Windows\System32\lsass.exe
User: SYSTEM
Why It Exists:
wininit.exe (PID 868)
└─ lsass.exe (PID 992) ⬅
Started: 5 minutes ago (Tue 2026-01-27 03:22:09 +0000)
D:\a\win-witr\win-witr>win-witr win-witr.exe
Process Name specified: win-witr.exe (PID 8896)
Executable Path: D:\a\win-witr\win-witr\win-witr.exe
User: runneradmin
Why It Exists:
wininit.exe (PID 868)
└─ services.exe (PID 964)
└─ svchost.exe (PID 2420)
└─ hosted-compute-agent (PID 9964)
└─ Runner.Listener.exe (PID 5356)
└─ Runner.Worker.exe (PID 6196)
└─ pwsh.exe (PID 2380)
└─ cmd.exe (PID 5648)
└─ win-witr.exe (PID 8896) ⬅
Started: 0 seconds ago (Tue 2026-01-27 03:27:44 +0000)
D:\a\win-witr\win-witr>win-witr wininit.exe
Process Name specified: wininit.exe (PID 868)
Executable Path: C:\Windows\System32\wininit.exe
User: N/A (Failed to access info)
Why It Exists:
wininit.exe (PID 868) ⬅
└─ services.exe (PID 964)
└─ LsaIso.exe (PID 984)
└─ lsass.exe (PID 992)
└─ fontdrvhost.exe (PID 500)
Started: 5 minutes ago (Tue 2026-01-27 03:22:08 +0000)
Running test: D:\a\win-witr\win-witr\tests\version\version.bat
D:\a\win-witr\win-witr>win-witr -v
win-witr v0.1.0
D:\a\win-witr\win-witr>win-witr --version
win-witr v0.1.0


why do some like wininit fail to acces info :(

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find the code that retrieves user information for processes
rg -n "User:" --type c --type cpp -C5

# Also search for Windows API calls related to getting process owner/user
rg -n "OpenProcessToken|GetTokenInformation|LookupAccountSid" --type c --type cpp -C3

# Find the main source files in the repository
fd -e c -e cpp -e h -e hpp . src

Length of output: 3324


🏁 Script executed:

#!/bin/bash
# Find the complete GetUserNameFromProcess function
rg -n "GetUserNameFromProcess" --type cpp -A50

# Look for OpenProcess calls to see what access rights are being used
rg -n "OpenProcess\(" --type cpp -C3

# Get the main.cpp file to see the full context
cat main.cpp | head -400

Length of output: 22783


@supervoidcoder Hey! I found the issue - it's actually a super common gotcha with Windows process security! 🔍

The Problem

On line 308 in main.cpp, your GetUserNameFromProcess function is using PROCESS_ALL_ACCESS:

HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, id);

This is way too aggressive for certain system processes. Here's why wininit.exe and similar processes fail:

  1. wininit.exe is a critical Session 0 initialization process that runs as SYSTEM
  2. Even though you're running as Admin, admins run in Session 1+ while these critical processes are in Session 0
  3. Windows has security boundaries that prevent even admins from getting PROCESS_ALL_ACCESS to protected system processes
  4. These processes have special protection - they're essentially the Windows kernel's babies 👶

The Fix

You only need query permissions to get the process token, not full access. You already have the pattern in your PIDinspect function (lines 540-549) - use the same fallback approach:

std::optional<std::wstring> GetUserNameFromProcess(DWORD id)
{
    HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, id);
    
    // Fallback to limited access if denied
    if (!hProcess && GetLastError() == ERROR_ACCESS_DENIED) {
        hProcess = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, id);
    }
    
    std::wstring endUser = L"";
    std::wstring endDomain = L"";

    if (hProcess != NULL)
    {
        HANDLE  hToken = NULL;

        if (OpenProcessToken(hProcess, TOKEN_QUERY, &hToken))
        {
            // ... rest of your code stays the same

This should get you user info for wininit.exe and other protected processes! The PROCESS_QUERY_LIMITED_INFORMATION flag is specifically designed to work across security boundaries while still letting you query basic process info.

Note: For truly kernel-level pseudo-processes (like PID 4 - System, Registry, etc.), even this won't work because they don't have traditional user contexts - they're pure kernel entities running in ring 0. The "N/A" is actually correct for those!

Try this fix and let me know if it works! 🐰


🧠 Learnings used
Learnt from: supervoidcoder
Repo: supervoidcoder/win-witr PR: 48
File: README.md:38-38
Timestamp: 2026-01-21T01:52:33.870Z
Learning: For supervoidcoder's README files in the win-witr repository: The user prefers an intentionally informal, humorous tone with casual language. Grammar formality suggestions (like "anyways" vs "anyway") should be skipped as they don't align with the intentional style of the documentation.

@supervoidcoder
Copy link
Owner Author

@coderabbitai dang it i knew i should've at least read the function i stole from stackoverflow

i mean what? of course i did! 😁😅

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Tip

For best results, initiate chat on the files or code changes.

@supervoidcoder Haha, hey, we've all been there! StackOverflow is basically the extended documentation for every programming language at this point 😄

The classic developer workflow:

  1. Copy code from StackOverflow ✅
  2. Does it compile? Ship it! ✅
  3. Deal with consequences later... ✅ ← you are here

But seriously, PROCESS_ALL_ACCESS is one of those "seems reasonable" flags that bites everyone eventually. Windows security is sneaky like that - it'll work fine for 90% of processes and then suddenly fail on the critical system ones.

Give the PROCESS_QUERY_INFORMATION + PROCESS_QUERY_LIMITED_INFORMATION fallback a shot and let me know if it catches those stubborn processes like wininit.exe! 🚀


🧠 Learnings used
Learnt from: supervoidcoder
Repo: supervoidcoder/win-witr PR: 48
File: README.md:38-38
Timestamp: 2026-01-21T01:52:33.870Z
Learning: For supervoidcoder's README files in the win-witr repository: The user prefers an intentionally informal, humorous tone with casual language. Grammar formality suggestions (like "anyways" vs "anyway") should be skipped as they don't align with the intentional style of the documentation.

…_query_information and add a PROCESS_QUERY_LIMITED_INFORMATION fallback
@supervoidcoder
Copy link
Owner Author

yooo you were right woohoo 😄

@coderabbitai
Running test: D:\a\win-witr\win-witr\tests\help\help.bat
D:\a\win-witr\win-witr>win-witr
win-witr - Why is this running? Windows version by supervoidcoder.
Running with elevated privileges (Admin).
Usage: win-witr [options]
Options:
-h, --help Show this help message and exit
-v, --version Show version information and exit
--port Specify the port to check
--pid Specify the PID to check
Specify the process name to check
D:\a\win-witr\win-witr>win-witr -h
win-witr - Why is this running? Windows version by supervoidcoder.
Running with elevated privileges (Admin).
Usage: win-witr [options]
Options:
-h, --help Show this help message and exit
-v, --version Show version information and exit
--port Specify the port to check
--pid Specify the PID to check
Specify the process name to check
D:\a\win-witr\win-witr>win-witr --help
win-witr - Why is this running? Windows version by supervoidcoder.
Running with elevated privileges (Admin).
Usage: win-witr [options]
Options:
-h, --help Show this help message and exit
-v, --version Show version information and exit
--port Specify the port to check
--pid Specify the PID to check
Specify the process name to check
Running test: D:\a\win-witr\win-witr\tests\pid\pid.bat
D:\a\win-witr\win-witr>win-witr --pid 4
PID specified: 4
Error: Unable to query executable path. Error code: 31
Maybe Access is Denied or the process is running entirely in RAM.
Hint: This error indicates a driver error, but in win-witr, it often means you are calling a pseudo-process, such as System, Registry, or other processes that only exist in RAM as a kernel process. It is often easy to tell them apart if they lack a .exe extension.
User: N/A (Failed to access info)
Why It Exists:
Secure System (PID 92)
└─ Registry (PID 136)
└─ smss.exe (PID 512)
Started: 3 minutes ago (Tue 2026-01-27 03:32:11 +0000)
Running test: D:\a\win-witr\win-witr\tests\process\process.bat
D:\a\win-witr\win-witr>win-witr winlogon.exe
Process Name specified: winlogon.exe (PID 5704)
Executable Path: C:\Windows\System32\winlogon.exe
User: SYSTEM
Why It Exists:
winlogon.exe (PID 5704) ⬅
└─ fontdrvhost.exe (PID 7116)
└─ dwm.exe (PID 6300)
Started: 2 minutes ago (Tue 2026-01-27 03:32:47 +0000)
D:\a\win-witr\win-witr>win-witr lsass.exe
Process Name specified: lsass.exe (PID 992)
Executable Path: C:\Windows\System32\lsass.exe
User: SYSTEM
Why It Exists:
wininit.exe (PID 868)
└─ lsass.exe (PID 992) ⬅
Started: 2 minutes ago (Tue 2026-01-27 03:32:20 +0000)
D:\a\win-witr\win-witr>win-witr win-witr.exe
Process Name specified: win-witr.exe (PID 8456)
Executable Path: D:\a\win-witr\win-witr\win-witr.exe
User: runneradmin
Why It Exists:
wininit.exe (PID 868)
└─ services.exe (PID 964)
└─ svchost.exe (PID 2692)
└─ hosted-compute-agent (PID 9240)
└─ Runner.Listener.exe (PID 7548)
└─ Runner.Worker.exe (PID 6824)
└─ pwsh.exe (PID 5524)
└─ cmd.exe (PID 6780)
└─ win-witr.exe (PID 8456) ⬅
Started: 0 seconds ago (Tue 2026-01-27 03:35:14 +0000)
D:\a\win-witr\win-witr>win-witr wininit.exe
Process Name specified: wininit.exe (PID 868)
Executable Path: C:\Windows\System32\wininit.exe
User: SYSTEM
Why It Exists:
wininit.exe (PID 868) ⬅
└─ services.exe (PID 964)
└─ LsaIso.exe (PID 984)
└─ lsass.exe (PID 992)
└─ fontdrvhost.exe (PID 692)
Started: 2 minutes ago (Tue 2026-01-27 03:32:19 +0000)
Running test: D:\a\win-witr\win-witr\tests\version\version.bat
D:\a\win-witr\win-witr>win-witr -v
win-witr v0.1.0
D:\a\win-witr\win-witr>win-witr --version
win-witr v0.1.0

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Tip

For best results, initiate chat on the files or code changes.

@supervoidcoder YES! 🎉 Look at that beautiful output!

The key win here:

D:\a\win-witr\win-witr>win-witr wininit.exe  
Process Name specified: wininit.exe (PID 868)
Executable Path: C:\Windows\System32\wininit.exe
User: SYSTEM  ⬅️ *chef's kiss* 👨‍🍳

Before: User: N/A (Failed to access info)
After: User: SYSTEM

Perfect! And notice that PID 4 (System) still correctly shows User: N/A - that's exactly what we want because it's a kernel pseudo-process with no traditional user context. Your error message for it is spot-on too.

The fallback pattern (PROCESS_QUERY_INFORMATIONPROCESS_QUERY_LIMITED_INFORMATION) is your friend for crossing those Session 0/1 security boundaries. Now you can query pretty much any real process while still gracefully handling the kernel weirdness! 🚀

Congrats on shipping the fix! The output looks fantastic now.


🧠 Learnings used
Learnt from: supervoidcoder
Repo: supervoidcoder/win-witr PR: 48
File: README.md:38-38
Timestamp: 2026-01-21T01:52:33.870Z
Learning: For supervoidcoder's README files in the win-witr repository: The user prefers an intentionally informal, humorous tone with casual language. Grammar formality suggestions (like "anyways" vs "anyway") should be skipped as they don't align with the intentional style of the documentation.

If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

@supervoidcoder
Copy link
Owner Author

@coderabbitai now i still feel like we're missing something...
but i think it's fine 🤔
hm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@supervoidcoder Hey! That uncertainty radar of yours might be onto something - let me take a closer look at the implementation to make sure everything's solid! 🔍


🏁 Script executed:

#!/bin/bash
# Get the current GetUserNameFromProcess implementation to review it
rg -n "GetUserNameFromProcess" --type cpp -A60 | head -80

# Also check if there are any resource cleanup issues
rg -n "CloseHandle|hProcess|hToken" main.cpp -C2

Length of output: 8708


@supervoidcoder Aha! Your spidey-sense is spot on - I found what's missing! 🕷️

The core logic is solid, but there's missing error handling on some critical Windows API calls. Right now you're only checking if OpenProcessToken succeeds, but the subsequent calls can also fail:

Line 329 - GetTokenInformation (second call):

GetTokenInformation(hToken, TokenUser, data, tokenSize, &tokenSize); // No error check! 😱

Lines 335 & 338 - Both LookupAccountSid calls:

LookupAccountSid(NULL, pSID, NULL, &userSize, NULL, &domainSize, &sidName); // No error check!
// ...
LookupAccountSid(NULL, pSID, user, &userSize, domain, &domainSize, &sidName); // No error check!

Why this matters:

If any of these fail (e.g., corrupted token data, invalid SID), the code keeps running with garbage data and could crash or show weird usernames. For example:

  • If GetTokenInformation fails → pSID points to uninitialized memory
  • If first LookupAccountSid fails → userSize/domainSize could be 0, allocating tiny buffers
  • If second LookupAccountSid fails → buffers contain junk, but you still return them as valid usernames

Quick fix:

Add checks like you did for OpenProcessToken:

if (GetTokenInformation(hToken, TokenUser, data, tokenSize, &tokenSize)) {
    TOKEN_USER* pUser = (TOKEN_USER*)data;
    PSID pSID = pUser->User.Sid;
    DWORD userSize = 0;
    DWORD domainSize = 0;
    SID_NAME_USE sidName;
    
    if (LookupAccountSid(NULL, pSID, NULL, &userSize, NULL, &domainSize, &sidName)) {
        wchar_t* user = new wchar_t[userSize + 1];
        wchar_t* domain = new wchar_t[domainSize + 1];
        
        if (LookupAccountSid(NULL, pSID, user, &userSize, domain, &domainSize, &sidName)) {
            user[userSize] = L'\0';
            domain[domainSize] = L'\0';
            endUser = user;
            endDomain = domain;
        }
        
        delete[] domain;
        delete[] user;
    }
}
delete[] data; // Move this outside the inner blocks

TL;DR: Your gut was right - the happy path works great, but edge cases with failed API calls aren't covered. Add some nested if checks and you're golden! 🎯


🧠 Learnings used
Learnt from: supervoidcoder
Repo: supervoidcoder/win-witr PR: 48
File: README.md:38-38
Timestamp: 2026-01-21T01:52:33.870Z
Learning: For supervoidcoder's README files in the win-witr repository: The user prefers an intentionally informal, humorous tone with casual language. Grammar formality suggestions (like "anyways" vs "anyway") should be skipped as they don't align with the intentional style of the documentation.

@supervoidcoder
Copy link
Owner Author

@coderabbitai ill finish tomorrow

i also want more tests

maybe download programs from winget and then run win-witr on them or something?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Tip

For best results, initiate chat on the files or code changes.

@supervoidcoder Sounds good, get some rest! 😴

The winget testing idea is interesting but has some gotchas:

🤔 Challenges with winget approach:

  • CI environment: Your GitHub Actions runner might not have winget properly configured (it's sometimes flaky in CI)
  • Download time: Installing real apps would slow down tests significantly
  • Cleanup: You'd need to uninstall everything after, which adds complexity
  • Flakiness: Network issues, download failures, etc. could make tests unreliable

🎯 Better testing strategies:

Option 1: Mock process spawning (fastest, most reliable)

REM Test with processes you KNOW will be running in CI
win-witr svchost.exe
win-witr conhost.exe
win-witr explorer.exe

Option 2: Spawn your own test processes

REM Start a simple background process
start /B notepad.exe
timeout /t 1
win-witr notepad.exe
taskkill /F /IM notepad.exe

Option 3: Test edge cases with system processes

  • Test various Session 0 processes (done ✅)
  • Test processes with different security contexts
  • Test protected processes (like antivirus)
  • Test processes with spaces in names
  • Test non-existent process names (error handling)

Option 4: Port testing

REM Your tool has --port flag, test it!
win-witr --port 80
win-witr --port 443

The current tests look solid for basic functionality - I'd focus on edge cases and error paths rather than installing random apps. What do you think? 🐰


🧠 Learnings used
Learnt from: supervoidcoder
Repo: supervoidcoder/win-witr PR: 48
File: README.md:38-38
Timestamp: 2026-01-21T01:52:33.870Z
Learning: For supervoidcoder's README files in the win-witr repository: The user prefers an intentionally informal, humorous tone with casual language. Grammar formality suggestions (like "anyways" vs "anyway") should be skipped as they don't align with the intentional style of the documentation.

@supervoidcoder
Copy link
Owner Author

here's all the stuff we got preinstalled according to github docs. this means anything from this list will take 0 seconds to install because it's already on the runner:

Announcements
[Windows/Ubuntu] Docker Server and Client will be updated to version 29.1.*, Docker Compose will be updated to version 2.40.3 on February 9th, 2026
[all OSs] Updating Azure PowerShell Module version to 14.6.0 on January 26th, 2026.

Windows Server 2025

  • OS Version: 10.0.26100 Build 32230
  • Image Version: 20260119.4.1

Windows features

  • Windows Subsystem for Linux (WSLv1): Enabled
  • Windows Subsystem for Linux (Default, WSLv2): 2.6.3.0

Installed Software

Language and Runtime

  • Bash 5.2.37(1)-release
  • Go 1.24.12
  • Julia 1.12.0
  • Kotlin 2.3.0
  • LLVM 20.1.8
  • Node 22.22.0
  • Perl 5.42.0
  • PHP 8.4.16
  • Python 3.12.10
  • Ruby 3.3.10

Package Management

  • Chocolatey 2.6.0
  • Composer 2.9.3
  • Helm 4.0.5
  • Miniconda 25.11.1 (pre-installed on the image but not added to PATH)
  • NPM 10.9.4
  • NuGet 7.0.1.1
  • pip 25.3 (python 3.12)
  • Pipx 1.8.0
  • RubyGems 3.5.22
  • Vcpkg (build from commit de51e6bfa9)
  • Yarn 1.22.22

Environment variables

Name Value
VCPKG_INSTALLATION_ROOT C:\vcpkg
CONDA C:\Miniconda

Project Management

  • Ant 1.10.15
  • Gradle 9.2
  • Maven 3.9.12
  • sbt 1.12.0

Tools

  • 7zip 25.01
  • aria2 1.37.0
  • azcopy 10.31.1
  • Bazel 8.5.1
  • Bazelisk 1.28.0
  • Bicep 0.39.26
  • Cabal 3.16.1.0
  • CMake 3.31.6
  • CodeQL Action Bundle 2.23.9
  • Docker 27.5.1
  • Docker Compose v2 2.32.2
  • Docker-wincred 0.9.5
  • ghc 9.14.1
  • Git 2.52.0.windows.1
  • Git LFS 3.7.1
  • ImageMagick 7.1.2-12
  • InnoSetup 6.7.0
  • jq 1.8.1
  • Kind 0.31.0
  • Kubectl 1.35.0
  • gcc 15.2.0
  • gdb 16.3
  • GNU Binutils 2.45
  • Newman 6.2.2
  • OpenSSL 3.6.0
  • Packer 1.14.2
  • Pulumi 3.216.0
  • R 4.5.2
  • Service Fabric SDK 10.1.2493.9590
  • Stack 3.9.1
  • Swig 4.3.1
  • VSWhere 3.1.7
  • WinAppDriver 1.2.2009.02003
  • WiX Toolset 3.14.1.8722
  • yamllint 1.38.0
  • zstd 1.5.7
  • Ninja 1.13.2

CLI Tools

  • AWS CLI 2.33.1
  • AWS SAM CLI 1.151.0
  • AWS Session Manager CLI 1.2.764.0
  • Azure CLI 2.82.0
  • Azure DevOps CLI extension 1.0.2
  • GitHub CLI 2.85.0

Rust Tools

  • Cargo 1.92.0
  • Rust 1.92.0
  • Rustdoc 1.92.0
  • Rustup 1.28.2

Packages

  • Clippy 0.1.92
  • Rustfmt 1.8.0

Browsers and Drivers

  • Google Chrome 144.0.7559.60
  • Chrome Driver 144.0.7559.31
  • Microsoft Edge 144.0.3719.82
  • Microsoft Edge Driver 144.0.3719.82
  • Mozilla Firefox 147.0.1
  • Gecko Driver 0.36.0
  • IE Driver 4.14.0.0
  • Selenium server 4.40.0

Environment variables

Name Value
CHROMEWEBDRIVER C:\SeleniumWebDrivers\ChromeDriver
EDGEWEBDRIVER C:\SeleniumWebDrivers\EdgeDriver
GECKOWEBDRIVER C:\SeleniumWebDrivers\GeckoDriver
SELENIUM_JAR_PATH C:\selenium\selenium-server.jar

Java

Version Environment Variable
8.0.472+8 JAVA_HOME_8_X64
11.0.29+7 JAVA_HOME_11_X64
17.0.17+10 (default) JAVA_HOME_17_X64
21.0.9+10.0 JAVA_HOME_21_X64
25.0.1+8.0 JAVA_HOME_25_X64

Shells

Name Target
gitbash.exe C:\Program Files\Git\bin\bash.exe
msys2bash.cmd C:\msys64\usr\bin\bash.exe
wslbash.exe C:\Windows\System32\bash.exe

MSYS2

  • Pacman 6.1.0

Notes

Location: C:\msys64

Note: MSYS2 is pre-installed on image but not added to PATH.

Cached Tools

Go

  • 1.22.12
  • 1.23.12
  • 1.24.12
  • 1.25.6

Node.js

  • 20.20.0
  • 22.22.0
  • 24.13.0

Python

  • 3.10.11
  • 3.11.9
  • 3.12.10
  • 3.13.11
  • 3.14.2

PyPy

  • 3.9.19 [PyPy 7.3.16]
  • 3.10.16 [PyPy 7.3.19]

Ruby

  • 3.2.10
  • 3.3.10
  • 3.4.8

Databases

PostgreSQL

Property Value
ServiceName postgresql-x64-17
Version 17.7
ServiceStatus Stopped
ServiceStartType Disabled
EnvironmentVariables PGBIN=C:\Program Files\PostgreSQL\17\bin
PGDATA=C:\PostgreSQL\17\data
PGROOT=C:\Program Files\PostgreSQL\17
Path C:\Program Files\PostgreSQL\17
UserName postgres
Password root

MongoDB

Version ServiceName ServiceStatus ServiceStartType
7.0.28.0 MongoDB Stopped Disabled

Database tools

  • Azure CosmosDb Emulator 2.14.25.0
  • DacFx 170.2.70.1
  • MySQL 8.0.44.0
  • SQL OLEDB Driver 18 18.7.5.0
  • SQL OLEDB Driver 19 19.4.1.0
  • SQLPS 1.0
  • MongoDB Shell (mongosh) 2.6.0

Web Servers

Name Version ConfigFile ServiceName ServiceStatus ListenPort
Apache 2.4.55 C:\tools\Apache24\conf\httpd.conf Apache Stopped 80
Nginx 1.29.4 C:\tools\nginx-1.29.4\conf\nginx.conf nginx Stopped 80

Visual Studio Enterprise 2022

Name Version Path
Visual Studio Enterprise 2022 17.14.36908.2 C:\Program Files\Microsoft Visual Studio\2022\Enterprise

Workloads, components and extensions

Package Version
android 35.0.78.0
Component.Android.NDK.R23C 17.14.36510.44
Component.Android.SDK.MAUI 17.14.36510.44
Component.Dotfuscator 17.14.36510.44
Component.Linux.CMake 17.14.36510.44
Component.Linux.RemoteFileExplorer 17.14.36510.44
Component.MDD.Android 17.14.36804.6
Component.MDD.Linux 17.14.36510.44
Component.MDD.Linux.GCC.arm 17.14.36510.44
Component.Microsoft.VisualStudio.RazorExtension 17.14.36510.44
Component.Microsoft.VisualStudio.Tools.Applications.amd64 17.0.36522.0
Component.Microsoft.VisualStudio.Web.AzureFunctions 17.14.36510.44
Component.Microsoft.Web.LibraryManager 17.14.36510.44
Component.Microsoft.WebTools.BrowserLink.WebLivePreview 17.14.2.50506
Component.Microsoft.Windows.DriverKit 10.0.26100.16
Component.OpenJDK 17.14.36510.44
Component.UnityEngine.x64 17.14.36510.44
Component.Unreal.Debugger 17.14.36907.17
Component.Unreal.Ide 17.14.36510.44
Component.VisualStudio.GitHub.Copilot 17.14.36907.17
Component.VSInstallerProjects2022 2.0.1
Component.WixToolset.VisualStudioExtension.Dev17 1.0.0.22
Component.WixToolset.VisualStudioExtension.Schemas3 1.0.0.22
ComponentGroup.Microsoft.NET.AppModernization 17.14.36705.20
ios 26.0.9752.0
maccatalyst 26.0.9752.0
maui.blazor 9.0.111.6930
maui.core 9.0.111.6930
maui.windows 9.0.111.6930
Microsoft.Component.Azure.DataLake.Tools 17.14.36510.44
Microsoft.Component.ClickOnce 17.14.36510.44
Microsoft.Component.CodeAnalysis.SDK 17.14.36510.44
Microsoft.Component.MSBuild 17.14.36510.44
Microsoft.Component.NetFX.Native 17.14.36510.44
Microsoft.Component.PythonTools 17.14.36510.44
Microsoft.Component.PythonTools.Web 17.14.36510.44
Microsoft.Component.VC.Runtime.UCRTSDK 17.14.36510.44
Microsoft.ComponentGroup.Blend 17.14.36510.44
Microsoft.ComponentGroup.ClickOnce.Publish 17.14.36510.44
Microsoft.Net.Component.4.5.2.TargetingPack 17.14.36510.44
Microsoft.Net.Component.4.6.2.TargetingPack 17.14.36510.44
Microsoft.Net.Component.4.6.TargetingPack 17.14.36510.44
Microsoft.Net.Component.4.7.1.TargetingPack 17.14.36510.44
Microsoft.Net.Component.4.7.2.TargetingPack 17.14.36510.44
Microsoft.Net.Component.4.7.TargetingPack 17.14.36510.44
Microsoft.Net.Component.4.8.1.SDK 17.14.36510.44
Microsoft.Net.Component.4.8.1.TargetingPack 17.14.36510.44
Microsoft.Net.Component.4.8.SDK 17.14.36510.44
Microsoft.Net.Component.4.8.TargetingPack 17.14.36510.44
Microsoft.Net.ComponentGroup.4.8.DeveloperTools 17.14.36510.44
Microsoft.Net.ComponentGroup.DevelopmentPrerequisites 17.14.36510.44
Microsoft.Net.ComponentGroup.TargetingPacks.Common 17.14.36510.44
microsoft.net.runtime.android 9.0.1225.60609
microsoft.net.runtime.android.aot 9.0.1225.60609
microsoft.net.runtime.android.aot.net8 9.0.1225.60609
microsoft.net.runtime.android.net8 9.0.1225.60609
microsoft.net.runtime.ios 9.0.1225.60609
microsoft.net.runtime.maccatalyst 9.0.1225.60609
microsoft.net.runtime.mono.tooling 9.0.1225.60609
microsoft.net.runtime.mono.tooling.net8 9.0.1225.60609
microsoft.net.sdk.emscripten 9.0.13.10239
Microsoft.NetCore.Component.DevelopmentTools 17.14.36510.44
Microsoft.NetCore.Component.Runtime.8.0 17.14.36907.17
Microsoft.NetCore.Component.Runtime.9.0 17.14.36907.17
Microsoft.NetCore.Component.SDK 17.14.36907.17
Microsoft.NetCore.Component.Web 17.14.36510.44
Microsoft.VisualStudio.Component.AppInsights.Tools 17.14.36510.44
Microsoft.VisualStudio.Component.AspNet 17.14.36510.44
Microsoft.VisualStudio.Component.AspNet45 17.14.36510.44
Microsoft.VisualStudio.Component.Azure.AuthoringTools 17.14.36510.44
Microsoft.VisualStudio.Component.Azure.ClientLibs 17.14.36907.17
Microsoft.VisualStudio.Component.Azure.Compute.Emulator 17.14.36517.7
Microsoft.VisualStudio.Component.Azure.ResourceManager.Tools 17.14.36510.44
Microsoft.VisualStudio.Component.Azure.ServiceFabric.Tools 17.14.36510.44
Microsoft.VisualStudio.Component.Azure.Waverton 17.14.36510.44
Microsoft.VisualStudio.Component.Azure.Waverton.BuildTools 17.14.36510.44
Microsoft.VisualStudio.Component.ClassDesigner 17.14.36510.44
Microsoft.VisualStudio.Component.CodeMap 17.14.36510.44
Microsoft.VisualStudio.Component.Common.Azure.Tools 17.14.36510.44
Microsoft.VisualStudio.Component.CoreEditor 17.14.36510.44
Microsoft.VisualStudio.Component.CppBuildInsights 17.14.36510.44
Microsoft.VisualStudio.Component.Debugger.JustInTime 17.14.36510.44
Microsoft.VisualStudio.Component.DiagnosticTools 17.14.36510.44
Microsoft.VisualStudio.Component.DockerTools 17.14.36510.44
Microsoft.VisualStudio.Component.DotNetModelBuilder 17.14.36510.44
Microsoft.VisualStudio.Component.DslTools 17.14.36510.44
Microsoft.VisualStudio.Component.EntityFramework 17.14.36510.44
Microsoft.VisualStudio.Component.FSharp 17.14.36510.44
Microsoft.VisualStudio.Component.FSharp.Desktop 17.14.36510.44
Microsoft.VisualStudio.Component.FSharp.WebTemplates 17.14.36510.44
Microsoft.VisualStudio.Component.GraphDocument 17.14.36510.44
Microsoft.VisualStudio.Component.Graphics 17.14.36510.44
Microsoft.VisualStudio.Component.Graphics.Tools 17.14.36510.44
Microsoft.VisualStudio.Component.HLSL 17.14.36510.44
Microsoft.VisualStudio.Component.IISExpress 17.14.36510.44
Microsoft.VisualStudio.Component.IntelliCode 17.14.36621.7
Microsoft.VisualStudio.Component.IntelliTrace.FrontEnd 17.14.36510.44
Microsoft.VisualStudio.Component.JavaScript.Diagnostics 17.14.36510.44
Microsoft.VisualStudio.Component.JavaScript.TypeScript 17.14.36510.44
Microsoft.VisualStudio.Component.LinqToSql 17.14.36510.44
Microsoft.VisualStudio.Component.LiveUnitTesting 17.14.36510.44
Microsoft.VisualStudio.Component.ManagedDesktop.Core 17.14.36510.44
Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites 17.14.36510.44
Microsoft.VisualStudio.Component.MSODBC.SQL 17.14.36510.44
Microsoft.VisualStudio.Component.MSSQL.CMDLnUtils 17.14.36510.44
Microsoft.VisualStudio.Component.Node.Tools 17.14.36510.44
Microsoft.VisualStudio.Component.NuGet 17.14.36510.44
Microsoft.VisualStudio.Component.NuGet.BuildTools 17.14.36510.44
Microsoft.VisualStudio.Component.PortableLibrary 17.14.36510.44
Microsoft.VisualStudio.Component.Roslyn.Compiler 17.14.36510.44
Microsoft.VisualStudio.Component.Roslyn.LanguageServices 17.14.36510.44
Microsoft.VisualStudio.Component.Sharepoint.Tools 17.14.36510.44
Microsoft.VisualStudio.Component.SQL.CLR 17.14.36510.44
Microsoft.VisualStudio.Component.SQL.DataSources 17.14.36510.44
Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime 17.14.36510.44
Microsoft.VisualStudio.Component.SQL.SSDT 17.14.36510.44
Microsoft.VisualStudio.Component.TeamOffice 17.14.36510.44
Microsoft.VisualStudio.Component.TestTools.CodedUITest 17.14.36510.44
Microsoft.VisualStudio.Component.TestTools.WebLoadTest 17.14.36510.44
Microsoft.VisualStudio.Component.TextTemplating 17.14.36510.44
Microsoft.VisualStudio.Component.TypeScript.TSServer 17.14.36510.44
Microsoft.VisualStudio.Component.Unity 17.14.36510.44
Microsoft.VisualStudio.Component.UWP.VC.ARM64 17.14.36510.44
Microsoft.VisualStudio.Component.UWP.VC.ARM64EC 17.14.36510.44
Microsoft.VisualStudio.Component.VC.14.29.16.11.ARM 17.14.36510.44
Microsoft.VisualStudio.Component.VC.14.29.16.11.ARM64 17.14.36510.44
Microsoft.VisualStudio.Component.VC.ASAN 17.14.36510.44
Microsoft.VisualStudio.Component.VC.ATL 17.14.36510.44
Microsoft.VisualStudio.Component.VC.ATL.ARM 17.14.36510.44
Microsoft.VisualStudio.Component.VC.ATL.ARM.Spectre 17.14.36510.44
Microsoft.VisualStudio.Component.VC.ATL.ARM64 17.14.36510.44
Microsoft.VisualStudio.Component.VC.ATL.ARM64.Spectre 17.14.36510.44
Microsoft.VisualStudio.Component.VC.ATL.Spectre 17.14.36510.44
Microsoft.VisualStudio.Component.VC.ATLMFC 17.14.36510.44
Microsoft.VisualStudio.Component.VC.ATLMFC.Spectre 17.14.36510.44
Microsoft.VisualStudio.Component.VC.CLI.Support 17.14.36510.44
Microsoft.VisualStudio.Component.VC.CMake.Project 17.14.36510.44
Microsoft.VisualStudio.Component.VC.CoreIde 17.14.36510.44
Microsoft.VisualStudio.Component.VC.DiagnosticTools 17.14.36510.44
Microsoft.VisualStudio.Component.VC.Llvm.Clang 17.14.36510.44
Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset 17.14.36510.44
Microsoft.VisualStudio.Component.VC.MFC.ARM 17.14.36510.44
Microsoft.VisualStudio.Component.VC.MFC.ARM.Spectre 17.14.36510.44
Microsoft.VisualStudio.Component.VC.MFC.ARM64 17.14.36510.44
Microsoft.VisualStudio.Component.VC.MFC.ARM64.Spectre 17.14.36510.44
Microsoft.VisualStudio.Component.VC.Modules.x86.x64 17.14.36510.44
Microsoft.VisualStudio.Component.VC.Redist.14.Latest 17.14.36510.44
Microsoft.VisualStudio.Component.VC.Redist.MSM 17.14.36510.44
Microsoft.VisualStudio.Component.VC.Runtimes.ARM.Spectre 17.14.36510.44
Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre 17.14.36510.44
Microsoft.VisualStudio.Component.VC.Runtimes.ARM64EC.Spectre 17.14.36510.44
Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre 17.14.36510.44
Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest 17.14.36510.44
Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest 17.14.36510.44
Microsoft.VisualStudio.Component.VC.Tools.ARM 17.14.36510.44
Microsoft.VisualStudio.Component.VC.Tools.ARM64 17.14.36510.44
Microsoft.VisualStudio.Component.VC.Tools.ARM64EC 17.14.36510.44
Microsoft.VisualStudio.Component.VC.Tools.x86.x64 17.14.36510.44
Microsoft.VisualStudio.Component.Vcpkg 17.14.36510.44
Microsoft.VisualStudio.Component.VSSDK 17.14.36510.44
Microsoft.VisualStudio.Component.Wcf.Tooling 17.14.36510.44
Microsoft.VisualStudio.Component.Web 17.14.36510.44
Microsoft.VisualStudio.Component.WebDeploy 17.14.36510.44
Microsoft.VisualStudio.Component.Windows10SDK 17.14.36510.44
Microsoft.VisualStudio.Component.Windows11SDK.26100 17.14.36907.17
Microsoft.VisualStudio.Component.Windows11Sdk.WindowsPerformanceToolkit 17.14.36510.44
Microsoft.VisualStudio.Component.WindowsAppSdkSupport.CSharp 17.14.36510.44
Microsoft.VisualStudio.Component.Workflow 17.14.36510.44
Microsoft.VisualStudio.Component.WslDebugging 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.ArchitectureTools.Native 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.AzureFunctions 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.Maui.All 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.Maui.Android 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.Maui.Blazor 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.Maui.iOS 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.Maui.MacCatalyst 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.Maui.Shared 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.Maui.Windows 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang 17.14.36802.14
Microsoft.VisualStudio.ComponentGroup.UWP.NetCoreAndStandard 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.UWP.VC.v142 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.VC.Tools.142.x86.x64 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.VisualStudioExtension.Prerequisites 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.Web 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.Web.CloudTools 17.14.36614.30
Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.CMake 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.TemplateEngine 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.WindowsAppDevelopment.Prerequisites 17.14.36510.44
Microsoft.VisualStudio.ComponentGroup.WindowsAppSDK.Cs 17.14.36510.44
Microsoft.VisualStudio.Workload.Azure 17.14.36904.0
Microsoft.VisualStudio.Workload.CoreEditor 17.14.36015.10
Microsoft.VisualStudio.Workload.Data 17.14.36015.10
Microsoft.VisualStudio.Workload.DataScience 17.14.36015.10
Microsoft.VisualStudio.Workload.ManagedDesktop 17.14.36518.2
Microsoft.VisualStudio.Workload.ManagedGame 17.14.36301.6
Microsoft.VisualStudio.Workload.NativeCrossPlat 17.14.36716.0
Microsoft.VisualStudio.Workload.NativeDesktop 17.14.36517.7
Microsoft.VisualStudio.Workload.NativeGame 17.14.36331.10
Microsoft.VisualStudio.Workload.NativeMobile 17.14.36802.14
Microsoft.VisualStudio.Workload.NetCrossPlat 17.14.36518.2
Microsoft.VisualStudio.Workload.NetWeb 17.14.36518.2
Microsoft.VisualStudio.Workload.Node 17.14.36517.7
Microsoft.VisualStudio.Workload.Office 17.14.36015.10
Microsoft.VisualStudio.Workload.Python 17.14.36015.10
Microsoft.VisualStudio.Workload.Universal 17.14.36331.10
Microsoft.VisualStudio.Workload.VisualStudioExtension 17.14.36015.10
runtimes.ios 9.0.1225.60609
runtimes.maccatalyst 9.0.1225.60609
wasm.tools 9.0.1225.60609
ProBITools.MicrosoftAnalysisServicesModelingProjects2022 4.0.0
ProBITools.MicrosoftReportProjectsforVisualStudio2022 4.0.0
SSIS.MicrosoftDataToolsIntegrationServices 2.1.2
VisualStudioClient.MicrosoftVisualStudio2022InstallerProjects 2.0.1
Windows Driver Kit Visual Studio Extension 10.0.26100.16
Windows Software Development Kit 10.1.26100.7175
WixToolset.WixToolsetVisualStudio2022Extension 1.0.0.22

Microsoft Visual C++

Name Architecture Version
Microsoft Visual C++ 2013 Additional Runtime x64 12.0.40660
Microsoft Visual C++ 2013 Minimum Runtime x64 12.0.40660
Microsoft Visual C++ 2022 Additional Runtime x64 14.44.35211
Microsoft Visual C++ 2022 Debug Runtime x64 14.44.35211
Microsoft Visual C++ 2022 Minimum Runtime x64 14.44.35211
Microsoft Visual C++ 2022 Additional Runtime x86 14.44.35211
Microsoft Visual C++ 2022 Debug Runtime x86 14.44.35211
Microsoft Visual C++ 2022 Minimum Runtime x86 14.44.35211

Installed Windows SDKs

  • 10.0.26100.0

.NET Core Tools

  • .NET Core SDK: 8.0.123, 8.0.206, 8.0.319, 8.0.417, 9.0.113, 9.0.205, 9.0.309, 10.0.102
  • .NET Framework: 4.8, 4.8.1
  • Microsoft.AspNetCore.App: 8.0.6, 8.0.22, 8.0.23, 9.0.6, 9.0.12, 10.0.2
  • Microsoft.NETCore.App: 8.0.6, 8.0.22, 8.0.23, 9.0.6, 9.0.12, 10.0.2
  • Microsoft.WindowsDesktop.App: 8.0.6, 8.0.22, 8.0.23, 9.0.6, 9.0.12, 10.0.2
  • nbgv 3.9.50+6feeb89450

PowerShell Tools

  • PowerShell 7.4.13

Powershell Modules

  • Az: 12.5.0
  • AWSPowershell: 5.0.136
  • DockerMsftProvider: 1.0.0.8
  • MarkdownPS: 1.10
  • Microsoft.Graph: 2.34.0
  • Pester: 3.4.0, 5.7.1
  • PowerShellGet: 1.0.0.1, 2.2.5
  • PSScriptAnalyzer: 1.24.0
  • PSWindowsUpdate: 2.2.1.5
  • SqlServer: 22.4.5.1
  • VSSetup: 2.2.16

Android

Package Name Version
Android Command Line Tools 16.0
Android Emulator 36.3.10
Android SDK Build-tools 36.0.0 36.1.0
35.0.0 35.0.1
34.0.0
Android SDK Platforms android-36.1 (rev 1)
android-36-ext19 (rev 1)
android-36-ext18 (rev 1)
android-36 (rev 2)
android-35-ext15 (rev 1)
android-35-ext14 (rev 1)
android-35 (rev 2)
android-34-ext8 (rev 1)
android-34-ext12 (rev 1)
android-34-ext11 (rev 1)
android-34-ext10 (rev 1)
android-34 (rev 3)
Android SDK Platform-Tools 36.0.2
Android Support Repository 47.0.0
CMake 3.30.5
3.31.5
4.1.2
Google Play services 49
Google Repository 58
NDK 27.3.13750724
28.2.13676358
29.0.14206865

Environment variables

Name Value
ANDROID_HOME C:\Android\android-sdk
ANDROID_NDK C:\Android\android-sdk\ndk\27.3.13750724
ANDROID_NDK_HOME C:\Android\android-sdk\ndk\27.3.13750724
ANDROID_NDK_LATEST_HOME C:\Android\android-sdk\ndk\29.0.14206865
ANDROID_NDK_ROOT C:\Android\android-sdk\ndk\27.3.13750724
ANDROID_SDK_ROOT C:\Android\android-sdk

@supervoidcoder
Copy link
Owner Author

@coderabbitai what do you think do you see some interesting stuff we could use on tests there?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Tip

For best results, initiate chat on the files or code changes.

@supervoidcoder Ooh yeah, there's some juicy stuff in there! 🎯

Here are my top picks for expanding your test suite:

🔥 High-Value Tests (Easy Wins)

1. Port-Based Testing ⬅️ Biggest gap right now!

REM Spawn a simple HTTP server and test --port flag
start /B python -m http.server 8080
timeout /t 2
win-witr --port 8080
taskkill /F /FI "COMMANDLINE like *http.server*"

2. Developer Tool Processes (guaranteed to exist)

win-witr git.exe
win-witr node.exe
win-witr python.exe
win-witr pwsh.exe  REM Already in your process tree!
win-witr cmd.exe   REM Also already there

3. Spawn Controlled Test Processes

REM Node.js server (to test long process chains)
echo console.log('test'); setTimeout(() => {}, 300000); > test.js
start /B node test.js
timeout /t 2
win-witr node.exe
taskkill /F /IM node.exe
del test.js

REM PowerShell background job
start /B pwsh -Command "Start-Sleep -Seconds 300"
timeout /t 2
win-witr pwsh.exe
taskkill /F /IM pwsh.exe

4. Browser Driver Processes (interesting, different user contexts)

REM These are sitting there unused!
start /B "C:\SeleniumWebDrivers\ChromeDriver\chromedriver.exe"
timeout /t 2
win-witr chromedriver.exe
taskkill /F /IM chromedriver.exe

5. Multiple Instances of Same Process

REM Test handling multiple PIDs for same process name
start /B notepad.exe
start /B notepad.exe
start /B notepad.exe
timeout /t 2
win-witr notepad.exe  REM How does it handle multiple matches?
taskkill /F /IM notepad.exe

🎪 Fun Edge Cases

Process with spaces in name:

"C:\Program Files\Git\cmd\git.exe" version
win-witr git.exe

Docker daemon (if running):

win-witr "com.docker.service"

Self-referential test (already doing this! 👍):

win-witr win-witr.exe  REM Love this one - shows the full spawn chain

🚀 My Top 3 Recommendations:

  1. Port testing - You built the --port flag but never test it!
  2. Spawn node/python servers - Controlled, reproducible, interesting process trees
  3. Test multiple PIDs with same name - Edge case that users will definitely hit

The beauty here is zero install time since everything's already on the runner. Way better than winget!

What do you think? Want me to help write a specific test script? 🐰


🧠 Learnings used
Learnt from: supervoidcoder
Repo: supervoidcoder/win-witr PR: 48
File: README.md:38-38
Timestamp: 2026-01-21T01:52:33.870Z
Learning: For supervoidcoder's README files in the win-witr repository: The user prefers an intentionally informal, humorous tone with casual language. Grammar formality suggestions (like "anyways" vs "anyway") should be skipped as they don't align with the intentional style of the documentation.

@supervoidcoder supervoidcoder marked this pull request as ready for review January 27, 2026 20:41
@coderabbitai coderabbitai bot added enhancement New feature or request priority: medium Medium priority ready-for-review Ready for review labels Jan 27, 2026
@supervoidcoder supervoidcoder added the windows Windows-specific issues label Jan 27, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@main.cpp`:
- Around line 323-345: Check and handle failures from GetTokenInformation and
LookupAccountSid before using their outputs: verify the return of
GetTokenInformation(hToken, TokenUser, data, tokenSize, &tokenSize) is TRUE and
that tokenSize > 0 before casting data to TOKEN_USER and accessing
pUser->User.Sid; likewise verify the return of LookupAccountSid(NULL, pSID,
user, &userSize, domain, &domainSize, &sidName) is TRUE before using or
null-terminating user/domain and assigning endUser/endDomain. On any failure,
free allocated buffers (data, user, domain), avoid dereferencing pSID/pUser, and
return or propagate an error/state instead of continuing. Ensure
tokenSize/userSize/domainSize checks cover zero/insufficient buffer cases and
handle GetLastError when deciding next steps.

…nvalid data.


GetTokenInformation (line 329) and LookupAccountSid (line 338) return values are ignored. If either fails, pUser->User.Sid is dereferenced with invalid data or user/domain buffers contain garbage, leading to crashes or corrupted output. The second call to each function must return successfully before using its results.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@main.cpp`:
- Around line 361-374: There is an extra closing brace that breaks the control
flow around the OpenProcessToken and process handle checks; remove the stray `}`
so that CloseHandle(hToken) remains inside the if (OpenProcessToken(hProcess,
TOKEN_QUERY, &hToken)) block and CloseHandle(hProcess) and the endUser return
logic remain inside the if (hProcess != NULL) block, preserving the intended
nesting for hToken, hProcess and the endUser return; verify the functions
OpenProcessToken, CloseHandle(hToken), CloseHandle(hProcess) and the endUser
return are properly enclosed by their respective if-blocks.
🧹 Nitpick comments (1)
main.cpp (1)

635-653: Integration logic is correct; minor formatting inconsistency.

The optional handling and VT mode check work correctly. The inconsistent indentation (mix of tabs and spaces, varying levels) doesn't affect compilation but reduces readability.

Suggested cleanup for consistent formatting
-	auto user = GetUserNameFromProcess(pid); // dang it dude it feels like such a war crime using auto in c++ 😭✌️
-	if (user.has_value()) {
-		if (IsVirtualTerminalModeEnabled()) {
-   			 std::cout << "\033[1;34mUser\033[0m: " << WideToString(user.value());
-		} else {
-				std::cout << "User: " << WideToString(user.value());
-			}
-			
-	} else {
-	   if (IsVirtualTerminalModeEnabled()) {
-        std::cout << "\033[1;34mUser\033[0m: \033[1;31mN/A (Failed to access info)\033[0m"; 
-    } else {
-        std::cout << "User: N/A (Failed to access info)";
-    }
-	}
+    auto user = GetUserNameFromProcess(pid);
+    if (user.has_value()) {
+        if (IsVirtualTerminalModeEnabled()) {
+            std::cout << "\033[1;34mUser\033[0m: " << WideToString(user.value());
+        } else {
+            std::cout << "User: " << WideToString(user.value());
+        }
+    } else {
+        if (IsVirtualTerminalModeEnabled()) {
+            std::cout << "\033[1;34mUser\033[0m: \033[1;31mN/A (Failed to access info)\033[0m";
+        } else {
+            std::cout << "User: N/A (Failed to access info)";
+        }
+    }

@supervoidcoder supervoidcoder merged commit 1301a05 into main Jan 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium Medium priority ready-for-review Ready for review windows Windows-specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant