© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
C
C#
•
3y ago
•
3 replies
swagrid
✅ Get full paths to executables in %PATH%
Is there an easy way to get the full path of a program that
's available in the shell because of the PATH environment variable
(like
gcm
gcm
does in powershell or
which
which
on unix
)
?
e
.g
.
ResolvePath("dotnet")
ResolvePath("dotnet")
would return
C:\Program Files\dotnet\dotnet.exe
C:\Program Files\dotnet\dotnet.exe
I don
't want to start a process and I don
't want to iterate over PATH myself
.
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
❔ how to get path to folder?
C
C# / help
3y ago
Get multiple objects in JObject path
C
C# / help
4y ago
❔ How to get file path of PDFs in project.
C
C# / help
3y ago
❔ Get full namespace name
C
C# / help
3y ago