├── .gitattributes ├── CI ├── ALSysIO64.sys ├── CoreTemp.exe ├── CoreTemp.ini └── winsqlite3.dll ├── README.md ├── appveyor-script.bat ├── appveyor.yml ├── doc ├── Makefile ├── README.md ├── envtool.Doxyfile ├── envtool.chm ├── envtool.css └── main_page.dox ├── envtool-help.png ├── envtool-release.zip ├── envtool.cfg └── src ├── Everything.c ├── Everything.h ├── Everything_ETP.c ├── Everything_ETP.h ├── Everything_IPC.h ├── Makefile.VC ├── Makefile.Windows ├── auth.c ├── auth.h ├── cache.c ├── cache.h ├── cfg_file.c ├── cfg_file.h ├── cmake.c ├── cmake.h ├── color.c ├── color.h ├── compiler.c ├── compiler.h ├── description.c ├── description.h ├── dirlist.c ├── dirlist.h ├── du.c ├── envtool.c ├── envtool.h ├── envtool.rc ├── envtool.sln ├── envtool.vcxproj ├── envtool_py.c ├── envtool_py.h ├── find_vstudio.c ├── foo └── win_glob.c ├── get_file_assoc.c ├── get_file_assoc.h ├── getopt_long.c ├── getopt_long.h ├── ignore.c ├── ignore.h ├── json.c ├── json.h ├── lua.c ├── lua.h ├── misc.c ├── pkg-config.c ├── pkg-config.h ├── regex.c ├── regex.h ├── report.c ├── report.h ├── searchpath.c ├── show_ver.c ├── smartlist.c ├── smartlist.h ├── sort.c ├── sort.h ├── tests.c ├── tests.h ├── vcpkg.c ├── vcpkg.h ├── win_glob.c ├── win_glob.h ├── win_sqlite3.c ├── win_trust.c └── win_ver.c /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Batch files must be run with CRLF line endings. 5 | *.bat text eol=crlf 6 | -------------------------------------------------------------------------------- /CI/ALSysIO64.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvanem/EnvTool/68027f3a5784650874b4fb4803e63de64a1ccd37/CI/ALSysIO64.sys -------------------------------------------------------------------------------- /CI/CoreTemp.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvanem/EnvTool/68027f3a5784650874b4fb4803e63de64a1ccd37/CI/CoreTemp.exe -------------------------------------------------------------------------------- /CI/CoreTemp.ini: -------------------------------------------------------------------------------- 1 | [General] 2 | ReadInt=1000; 3 | LogInt=10; 4 | Language=; 5 | Plugins=1; 6 | EnLog=0; 7 | SingleInstance=1; 8 | AutoUpdateCheck=1; 9 | 10 | [Display] 11 | Fahr=0; 12 | Minimized=0; 13 | CloseToSystray=0; 14 | HideTaskbarButton=0; 15 | TextColor=FF000000; 16 | StatusColor=0000C0FF,000000FF; 17 | LabelColor=FF000000; 18 | 19 | [System tray] 20 | SystrayOption=0; 21 | SystrayTransparentBack=1; 22 | SystrayColorAllBack=; 23 | SystrayColorAllText=; 24 | SystrayColorHighCpuBack=; 25 | SystrayColorHighCpuText=; 26 | SystrayColorHighBack=; 27 | SystrayColorHighText=; 28 | SystrayColorClockBack=; 29 | SystrayColorClockText=; 30 | SystrayColorLoadBack=; 31 | SystrayColorLoadText=; 32 | SystrayColorRamBack=; 33 | SystrayColorRamText=; 34 | SystrayColorPowerBack=; 35 | SystrayColorPowerText=; 36 | SystrayDisplayFrequency=0; 37 | SystrayDisplayLoad=0; 38 | SystrayDisplayRam=0; 39 | SystrayDisplayPower=0; 40 | SystrayFontName=Tahoma; 41 | SystrayFontSize=8; 42 | 43 | [Windows 7 Taskbar button settings] 44 | W7TBEnable=1; 45 | W7TBOption=0; 46 | W7TBCycleDelay=10; 47 | W7TBFrequencyColor=2; 48 | W7TBDisableMinimizeToTray=0; 49 | 50 | [G15 LCD settings] 51 | G15BuiltInFont=1; 52 | G15Time=1; 53 | G1524HTime=0; 54 | G15FontName=Tahoma; 55 | G15FontSize=8; 56 | 57 | [Advanced] 58 | ShowDTJ=0; 59 | BusClk=0; 60 | SnmpSharedMemory=0; 61 | 62 | [Overheat protection settings] 63 | EnableOHP=0; 64 | NotifyHot=0; 65 | Balloon=1; 66 | Flash=0; 67 | Execute=; 68 | EnableShutDown=0; 69 | ProtectionType=0; 70 | ActivateAt=0; 71 | Seconds=30; 72 | ExecuteOnce=1; 73 | Degrees=90; 74 | 75 | [Misc] 76 | Version=0; 77 | TjMaxOffset=0; 78 | AlwaysOnTop=0; 79 | MiniMode=0; 80 | AltFreq=0; 81 | 82 | [UI] 83 | SPX=0; 84 | SPY=0; 85 | CoreFrequencySelector=-1; 86 | -------------------------------------------------------------------------------- /CI/winsqlite3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvanem/EnvTool/68027f3a5784650874b4fb4803e63de64a1ccd37/CI/winsqlite3.dll -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # EnvTool v1.4: 2 | 3 | [](https://ci.appveyor.com/project/gvanem/envtool) 4 | 5 | A tool to search along various environment variables for files (or a wildcard). The following modes 6 | handles these environment variables: 7 | [](envtool-help.png?raw=true) 8 | 9 | 23 | 24 | It also checks for missing directories along the above env-variables. 25 | 26 | The `--path` option also checks these registry keys: 27 | `HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths` and 28 | `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths` 29 | 30 | and enumerates all keys for possible programs. E.g. if registry contains this: 31 | `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\makensis.exe` = 32 | `f:\MinGW32\bin\MingW-studio\makensis.exe`, 33 | 34 | `envtool --path maken*` will include `f:\MinGW32\bin\MingW-studio\makensis.exe` 35 | in the result. 36 | 37 | Problem with old programs pestering your `PATH` and _Registry_ entries can be tricky 38 | to diagnose. Here I had an problem with an old version of the _FoxitReader PDF reader_: 39 | Checking with `envtool --path foxit*.exe`, resulted in: 40 | 41 | ``` 42 | Matches in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths: 43 | (2) 27 Nov 2014 - 10:24:04: f:\ProgramFiler\FoxitReader\FoxitReader.exe 44 | Matches in %PATH: 45 | 21 Apr 2006 - 17:43:10: f:\util\FoxitReader.exe 46 | (2): found in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths". 47 | ``` 48 | 49 | Hence if you write `FoxitReader` in the Window Run-box (_Winkey-R_), you'll get the 50 | newer (27 Nov 2014) `FoxitReader` launched. But if you say `FoxitReader` in your shell 51 | (cmd etc.), you'll get the old version (21 Apr 2006). 52 | 53 | Other examples: 54 | 55 | **E.g. 1**: `envtool --path notepad*.exe` first checks the `%PATH%` env-var 56 | for consistency (reports missing directories in `%PATH%`) and prints 57 | all the locations of `notepad*.exe`. On my box the result is: 58 | 59 | ``` 60 | Thu Jul 21 16:02:20 2011: f:\windows\system32\notepad-orig.exe 61 | Mon Nov 18 19:26:40 2002: f:\windows\system32\notepad.exe 62 | Thu Jul 21 16:13:11 2011: f:\windows\system32\notepad2.exe 63 | Mon Nov 18 19:26:40 2002: f:\windows\notepad.exe 64 | ``` 65 | 66 | **E.g. 2**: `envtool --inc afxwin*` first checks the `%INCLUDE%` env-var 67 | for consistency (reports missing directories in `%INCLUDE`) and prints 68 | all the locations of `afxwin*`. On my box the result is: 69 | 70 | ``` 71 | Thu Apr 14 18:54:46 2005: g:\vc_2010\VC\AtlMfc\include\AFXWIN.H 72 | Thu Apr 14 18:54:46 2005: g:\vc_2010\VC\AtlMfc\include\AFXWIN1.INL 73 | Thu Apr 14 18:54:46 2005: g:\vc_2010\VC\AtlMfc\include\AFXWIN2.INL 74 | Thu Apr 14 18:54:46 2005: g:\vc_2010\VC\AtlMfc\include\AFXWIN.H 75 | Thu Apr 14 18:54:46 2005: g:\vc_2010\VC\AtlMfc\include\AFXWIN1.INL 76 | Thu Apr 14 18:54:46 2005: g:\vc_2010\VC\AtlMfc\include\AFXWIN2.INL 77 | ``` 78 | 79 | **E.g. 3**: If an _App Paths_ registry key has an alias for a command, the target 80 | program is printed. E.g. if: 81 | `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\winzip.exe` 82 | points to `c:\PROGRA~1\WINZIP\winzip32.exe` 83 | 84 | (here `winzip.exe` is an alias for the real program `winzip32.exe`). Hence 85 | `envtool --path winzip*` reports: 86 | 87 | ``` 88 | Fri Oct 11 09:10:00 2002: f:\PROGRA~1\WINZIP\winzip.exe ! 89 | Fri Oct 11 09:10:00 2002: f:\PROGRA~1\WINZIP\winzip32.exe ! 90 | (!) - found in registry. 91 | ``` 92 | 93 | **E.g. 4**: It's pretty amazing what the _FindFile()_ API in Windows can do. E.g.: 94 | `envtool --path *-?++.exe`: 95 | 96 | ``` 97 | Tue Nov 19 12:01:38 2002: f:\Mingw32\bin\mingw32-c++.exe 98 | Tue Nov 19 12:01:38 2002: f:\Mingw32\bin\mingw32-g++.exe 99 | Wed Mar 09 14:39:05 2011: f:\CygWin\bin\i686-pc-cygwin-c++.exe 100 | Wed Mar 09 14:39:05 2011: f:\CygWin\bin\i686-pc-cygwin-g++.exe 101 | ``` 102 | 103 | Although not as powerful as "POSIX-style file matching" which is also built-in 104 | via the `fnmatch()` function. 105 | 106 | **E.g. 5**: If you have Python installed, the `--python` option will search in 107 | `%PYTHONPATH` and `sys.path[]` for a match. E.g.: 108 | `envtool.exe --python ss*.py`: 109 | 110 | ``` 111 | 24 Jun 2011 - 11:38:10: f:\ProgramFiler\Python27\lib\ssl.py 112 | 16 Feb 2011 - 12:14:28: f:\ProgramFiler\Python27\lib\site-packages\win32\lib\sspi.py 113 | 16 Feb 2011 - 12:14:28: f:\ProgramFiler\Python27\lib\site-packages\win32\lib\sspicon.py 114 | ``` 115 | 116 | **E.g. 6**: The `--python` option will also look inside Python *EGGs* (plain ZIP-files) found 117 | in `sys.path[]`. E.g.: 118 | `envtool.exe --python socket.py`: 119 | 120 | ``` 121 | 27 Mar 2013 - 16:41:58: stem\socket.py (%PYTHONHOME\lib\site-packages\stem-1.0.1-py2.7.egg) 122 | 30 Apr 2014 - 09:54:04: f:\Programfiler\Python27\lib\socket.py 123 | ``` 124 | 125 | **E.g. 7**: If you have Lua installed, the `--lua` option will search in 126 | `%LUA_PATH` and `%LUA_CPATH` for a match. E.g.: 127 | `envtool.exe --lua [gs]*.dll`: 128 | 129 | ``` 130 | 12 Aug 2021 - 13:11:04: f:\MingW32\src\inet\Lua\luasocket\install\gem.dll 131 | 12 Aug 2021 - 15:25:09: f:\MingW32\src\inet\Lua\LuaSec\src\ssl.dll 132 | ``` 133 | 134 | **E.g. 8**: The `--evry` option combined with the `--regex` (or `-r`) is quite powerful. To find 135 | all directories with Unix man-pages, you can do this: 136 | `envtool.exe --evry -r "man[1-9]$"`: 137 | 138 | ``` 139 |
\c --cmake | Check and search in \c \%CMAKE_MODULE_PATH\% 96 | and it's built-in module-path. 97 | | ||||||||
\c --cmake | Check and search in \c \%CMAKE_MODULE_PATH\% and it's built-in module-path. 98 | | ||||||||
\c --evry[=\em host] | Check and search in the [EveryThing](https://www.voidtools.com/) database. 99 | | ||||||||
\c --inc | Check and search in \c \%INCLUDE\%. 100 | | ||||||||
\c --lib | Check and search in \c \%LIB\% and \c \%LIBRARY_PATH\%. 101 | | ||||||||
\c --lua | Check and search in \c \%LUA_PATH\% and \c \%LUA_CPATH\%. 102 | | ||||||||
\c --man | Check and search in \c \%MANPATH\%. 103 | | ||||||||
\c --path | Check and search in \c \%PATH\%. 104 | | ||||||||
\c --pkg | Check and search in \c \%PKG_CONFIG_PATH\%. 105 | | ||||||||
\c --python[=\em X] | Check and search in \c \%PYTHONPATH\% and \c sys.path[]. 106 | The \em X selects a specific Python (if found). Can be one of these: 107 |
| ||||||||
\c --vcpkg[=\em all] | Check and search for VCPKG packages. 116 | | ||||||||
\c --check | Check for missing directories in all supported environment variables 117 | and missing files in these Registry keys: 118 | \verbatim HKCU\Microsoft\Windows\CurrentVersion\App Paths \endverbatim 119 | \verbatim HKLM\Microsoft\Windows\CurrentVersion\App Paths \endverbatim 120 | |
127 | \c --no-gcc | Don't spawn \c prefix -gcc prior to checking. [2]. 128 | | ||||||||||||||||||||||||||
\c --no-g++ | Don't spawn \c prefix -g++ prior to checking. [2] 129 | | ||||||||||||||||||||||||||
\c --no-prefix | Don't check any \c prefix -ed gcc/g++ programs [2]. 130 | | ||||||||||||||||||||||||||
\c --no-sys | Don't scan \c HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session \c Manager\\Environment. 131 | | ||||||||||||||||||||||||||
\c --no-usr | Don't scan \c HKCU\\Environment. 132 | | ||||||||||||||||||||||||||
\c --no-app | Don't scan \code 133 | HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths 134 | HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths 135 | \endcode 136 | | ||||||||||||||||||||||||||
\c --no-colour | Don't print using colours. 137 | | ||||||||||||||||||||||||||
\c --no-watcom | Don't check for Watcom in \c --include or \c --lib mode 138 | | ||||||||||||||||||||||||||
\c --owner | Shown owner of the file. 139 | | ||||||||||||||||||||||||||
\c --owner=\em [X] | Shown only owners matching \c X. 140 | | ||||||||||||||||||||||||||
\c --owner=\em [!X] | Shown only owners \b not matching \c X. 141 | | ||||||||||||||||||||||||||
\c --pe | Print checksum, version-info and signing status for PE-files. 142 | | ||||||||||||||||||||||||||
\c --32 | Tell \c prefix -gcc to return only 32-bit libs in \c --lib mode. 143 | Report only 32-bit PE-files with \c --pe option. 144 | | ||||||||||||||||||||||||||
\c --64 | Tell \c prefix -gcc to return only 64-bit libs in \c --lib mode. 145 | Report only 64-bit PE-files with \c --pe option. 146 | | ||||||||||||||||||||||||||
\c -c | Don't add current directory to search-lists. 147 | | ||||||||||||||||||||||||||
\c -C | Be case-sensitive. 148 | | ||||||||||||||||||||||||||
\c -d, \c --debug | Set debug level (\c -dd sets \c PYTHONVERBOSE=1 in \c --python mode). 149 | | ||||||||||||||||||||||||||
\c -D, \c --dir | Looks only for directories matching \c \\c -H, \c --host | Hostname/IPv4-address for remote FTP \c --evry searches.
151 | Can be used multiple times. | 152 | Alternative syntax is \c --evry:host\[:port]. 153 | 154 | \c --evry remote FTP options: |
155 | | \c --nonblock-io | connects using non-blocking I/O.
156 | | \c --buffered-io | use buffering to receive the data.
157 |
158 | | \c -r, \c --regex | Enable Regular Expressions in all \c --mode searches.
159 | | \c -s, \c --size | Show size of file(s) found. With \c --dir option, recursively show | 160 | the size of all files under directories matching \c \ \c -q, \c --quiet | Disable warnings.
162 | | \c -t | Do some internal tests.
163 | | \c -T | Show file times in sortable decimal format. E.g. \c "20121107.180658".
164 | | \c -u | Show all paths on Unix format. E.g. \c c:/ProgramFiles/.
165 | | \c -v | Increase verbose level (currently used in \c --pe and \c --check).
166 | | \c -V | Show basic program version information. | 167 | \c -VV and \c -VVV prints much more information. 168 | \c -h, \c -? | Show this help.
169 | | |