@@ -71,15 +71,15 @@ if %errorlevel% equ 0 (
7171 echo [MISSING] Visual C++ 2019 Redistributable (x86) is NOT installed >> " %log_file% "
7272 echo Download from: https://aka.ms/vs/17/release/vc_redist.x86.exe >> " %log_file% "
7373)
74- echo . >> %log_file%
74+ echo . >> " %log_file% "
7575
7676REM Updated paths to include Visual Studio 2019 and 2022
7777set POSSIBLE_PATHS_X86 = " C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\*\bin\Hostx86\x86\dumpbin.exe" " C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\*\bin\Hostx86\x86\dumpbin.exe" " C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\*\bin\Hostx86\x86\dumpbin.exe" " C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\*\bin\Hostx86\x86\dumpbin.exe" " C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\*\bin\Hostx86\x86\dumpbin.exe" " C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\*\bin\Hostx86\x86\dumpbin.exe" " C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\dumpbin.exe" " C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\dumpbin.exe"
7878set POSSIBLE_PATHS_X64 = " C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\*\bin\Hostx64\x64\dumpbin.exe" " C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\*\bin\Hostx64\x64\dumpbin.exe" " C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\*\bin\Hostx64\x64\dumpbin.exe" " C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\*\bin\Hostx64\x64\dumpbin.exe" " C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\*\bin\Hostx64\x64\dumpbin.exe" " C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\*\bin\Hostx64\x64\dumpbin.exe" " C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\dumpbin.exe"
7979
8080for %%i in (%POSSIBLE_PATHS_X86% ) do (
8181 echo Checking for dumpbin x86... %%i
82- echo Checking for dumpbin x86... %%i >> %log_file%
82+ echo Checking for dumpbin x86... %%i >> " %log_file% "
8383 if exist %%i (
8484 SET DUMPBIN_X86 = %%i
8585 goto found_x86
@@ -89,87 +89,87 @@ for %%i in (%POSSIBLE_PATHS_X86%) do (
8989
9090for %%i in (%POSSIBLE_PATHS_X64% ) do (
9191 echo Checking for dumpbin x64... %%i
92- echo Checking for dumpbin x64... %%i >> %log_file%
92+ echo Checking for dumpbin x64... %%i >> " %log_file% "
9393 if exist %%i (
9494 SET DUMPBIN_X64 = %%i
9595 goto found_x64
9696 )
9797)
9898:found_x64
9999
100- echo ================================================ >> %log_file%
101- echo ModSecurity IIS Dependency Analysis >> %log_file%
102- echo ================================================ >> %log_file%
103- echo . >> %log_file%
100+ echo ================================================ >> " %log_file% "
101+ echo ModSecurity IIS Dependency Analysis >> " %log_file% "
102+ echo ================================================ >> " %log_file% "
103+ echo . >> " %log_file% "
104104
105105REM Check ModSecurity DLL locations
106- echo Checking ModSecurity DLL locations... >> %log_file%
106+ echo Checking ModSecurity DLL locations... >> " %log_file% "
107107if exist " %SystemRoot% \System32\inetsrv\ModSecurityIIS.dll" (
108- echo [FOUND] %SystemRoot% \System32\inetsrv\ModSecurityIIS.dll >> %log_file%
108+ echo [FOUND] %SystemRoot% \System32\inetsrv\ModSecurityIIS.dll >> " %log_file% "
109109) else (
110- echo [MISSING] %SystemRoot% \System32\inetsrv\ModSecurityIIS.dll >> %log_file%
110+ echo [MISSING] %SystemRoot% \System32\inetsrv\ModSecurityIIS.dll >> " %log_file% "
111111)
112112
113113if exist " %SystemRoot% \SysWOW64\inetsrv\ModSecurityIIS.dll" (
114- echo [FOUND] %SystemRoot% \SysWOW64\inetsrv\ModSecurityIIS.dll >> %log_file%
114+ echo [FOUND] %SystemRoot% \SysWOW64\inetsrv\ModSecurityIIS.dll >> " %log_file% "
115115) else (
116- echo [MISSING] %SystemRoot% \SysWOW64\inetsrv\ModSecurityIIS.dll >> %log_file%
116+ echo [MISSING] %SystemRoot% \SysWOW64\inetsrv\ModSecurityIIS.dll >> " %log_file% "
117117)
118- echo . >> %log_file%
118+ echo . >> " %log_file% "
119119
120120if " %DUMPBIN_X86:~1 ,-1 % " == " " (
121121 echo Dumpbin x86 not found.
122- echo Dumpbin x86 not found. >> %log_file%
123- echo NOTE: Install Visual Studio 2019/2022 with C++ tools to use dumpbin. >> %log_file%
122+ echo Dumpbin x86 not found. >> " %log_file% "
123+ echo NOTE: Install Visual Studio 2019/2022 with C++ tools to use dumpbin. >> " %log_file% "
124124) else (
125125 echo Using dumpbin x86: %DUMPBIN_X86%
126- echo Using dumpbin x86: %DUMPBIN_X86% >> %log_file%
127- echo . >> %log_file%
126+ echo Using dumpbin x86: %DUMPBIN_X86% >> " %log_file% "
127+ echo . >> " %log_file% "
128128 if exist " %SystemRoot% \SysWOW64\inetsrv\ModSecurityIIS.dll" (
129- echo ================================================ >> %log_file%
130- echo 32-bit ModSecurityIIS.dll dependencies: >> %log_file%
131- echo ================================================ >> %log_file%
132- %DUMPBIN_X86% /imports /dependents " %SystemRoot% \SysWOW64\inetsrv\ModSecurityIIS.dll" >> %log_file% 2 >& 1
129+ echo ================================================ >> " %log_file% "
130+ echo 32-bit ModSecurityIIS.dll dependencies: >> " %log_file% "
131+ echo ================================================ >> " %log_file% "
132+ %DUMPBIN_X86% /imports /dependents " %SystemRoot% \SysWOW64\inetsrv\ModSecurityIIS.dll" >> " %log_file% " 2 >& 1
133133 )
134134 if not " %* " == " " (
135- echo . >> %log_file%
136- echo ================================================ >> %log_file%
137- echo Additional files specified: >> %log_file%
138- echo ================================================ >> %log_file%
139- %DUMPBIN_X86% /imports /dependents %* >> %log_file% 2 >& 1
135+ echo . >> " %log_file% "
136+ echo ================================================ >> " %log_file% "
137+ echo Additional files specified: >> " %log_file% "
138+ echo ================================================ >> " %log_file% "
139+ %DUMPBIN_X86% /imports /dependents %* >> " %log_file% " 2 >& 1
140140 )
141141)
142142
143- echo . >> %log_file%
143+ echo . >> " %log_file% "
144144
145145if " %DUMPBIN_X64:~1 ,-1 % " == " " (
146146 echo Dumpbin x64 not found.
147- echo Dumpbin x64 not found. >> %log_file%
148- echo NOTE: Install Visual Studio 2019/2022 with C++ tools to use dumpbin. >> %log_file%
147+ echo Dumpbin x64 not found. >> " %log_file% "
148+ echo NOTE: Install Visual Studio 2019/2022 with C++ tools to use dumpbin. >> " %log_file% "
149149) else (
150150 echo Using dumpbin x64: %DUMPBIN_X64%
151- echo Using dumpbin x64: %DUMPBIN_X64% >> %log_file%
152- echo . >> %log_file%
151+ echo Using dumpbin x64: %DUMPBIN_X64% >> " %log_file% "
152+ echo . >> " %log_file% "
153153 if exist " %SystemRoot% \System32\inetsrv\ModSecurityIIS.dll" (
154- echo ================================================ >> %log_file%
155- echo 64-bit ModSecurityIIS.dll dependencies: >> %log_file%
156- echo ================================================ >> %log_file%
157- %DUMPBIN_X64% /imports /dependents " %SystemRoot% \System32\inetsrv\ModSecurityIIS.dll" >> %log_file% 2 >& 1
154+ echo ================================================ >> " %log_file% "
155+ echo 64-bit ModSecurityIIS.dll dependencies: >> " %log_file% "
156+ echo ================================================ >> " %log_file% "
157+ %DUMPBIN_X64% /imports /dependents " %SystemRoot% \System32\inetsrv\ModSecurityIIS.dll" >> " %log_file% " 2 >& 1
158158 )
159159 if not " %* " == " " (
160- echo . >> %log_file%
161- echo ================================================ >> %log_file%
162- echo Additional files specified: >> %log_file%
163- echo ================================================ >> %log_file%
164- %DUMPBIN_X64% /imports /dependents %* >> %log_file% 2 >& 1
160+ echo . >> " %log_file% "
161+ echo ================================================ >> " %log_file% "
162+ echo Additional files specified: >> " %log_file% "
163+ echo ================================================ >> " %log_file% "
164+ %DUMPBIN_X64% /imports /dependents %* >> " %log_file% " 2 >& 1
165165 )
166166)
167167
168168goto exit
169169
170170:exit
171- echo Logs were saved at: %log_file% .
171+ echo Logs were saved at: " %log_file% " .
172172echo Trying to open it with explorer...
173- explorer %log_file%
173+ explorer " %log_file% "
174174echo Done.
175175pause
0 commit comments