https://github.com/hymkor/apppath
Show `App Paths`
https://github.com/hymkor/apppath
go golang windows
Last synced: 24 days ago
JSON representation
Show `App Paths`
- Host: GitHub
- URL: https://github.com/hymkor/apppath
- Owner: hymkor
- License: mit
- Created: 2017-03-03T04:00:15.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-03T05:57:33.000Z (about 8 years ago)
- Last Synced: 2025-02-10T15:50:58.745Z (3 months ago)
- Topics: go, golang, windows
- Language: Go
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
apppath.exe
===========Print `App Paths`.
```
$ apppath.exe wordpad.exe
"%ProgramFiles%\Windows NT\Accessories\WORDPAD.EXE"
```Some applications are executable even if it is not on %PATH%.
Because the application's fullpath is written in
`HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths`.This program shows it.
Example
-------Build with the solution of Visual Studio.
Batchfile:
```
for /F "tokens=*" %%D in ('apppath devenv.exe') do "%%D" example.sln /build Release
```is substituted to :
```
"c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" example.sln /build Debug
```We need not to run the heavy batchfile vcvarsall.bat so-called "Visual Studio Command Prompt."
Misc.
----`apppath.exe` is same as:
```
for /F "skip=2 tokens=2*" %%I in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\%1" /ve') do echo %%J
```