laasunde
February 15th, 2008, 06:39 AM
Hi. Trying to develop a dos script but need some help. Basically I've got a utility dllcheck that takes an dll or exe as argument and outputs all its dependencies.
c:\Myfolder\bin>DllCheck.exe /m aapc.dll
c:\Myfolder\bin\KBasis.dll
c:\Myfolder\bin\KiConf.dll
C:\WINDOWS\system32\ole32.dll
C:\WINDOWS\system32\MFC70.DLL
...
Taking the above script a bit further I can search for a specific file being used.
DllCheck.exe /m aapc.dll | findstr "ole"
C:\WINDOWS\system32\ole32.dll
How can I using a dos batch script run that above command and then check how many entries with "ole" a given file contains? Say for instance I iterate through many files and would only like to output a text if the file contains a ref. to "ole" - how could I achieve this?
Currently doing this;
for /r %%f in (*.dll) do ((echo ***%%~nxf & DllCheck.exe /m %%f | findstr "ole") >> Output.log)
Second question, is it safe to assume that if a dll or exe has a dependency to mscoree.dll that is uses .NET resources?
Using WinXP btw.
c:\Myfolder\bin>DllCheck.exe /m aapc.dll
c:\Myfolder\bin\KBasis.dll
c:\Myfolder\bin\KiConf.dll
C:\WINDOWS\system32\ole32.dll
C:\WINDOWS\system32\MFC70.DLL
...
Taking the above script a bit further I can search for a specific file being used.
DllCheck.exe /m aapc.dll | findstr "ole"
C:\WINDOWS\system32\ole32.dll
How can I using a dos batch script run that above command and then check how many entries with "ole" a given file contains? Say for instance I iterate through many files and would only like to output a text if the file contains a ref. to "ole" - how could I achieve this?
Currently doing this;
for /r %%f in (*.dll) do ((echo ***%%~nxf & DllCheck.exe /m %%f | findstr "ole") >> Output.log)
Second question, is it safe to assume that if a dll or exe has a dependency to mscoree.dll that is uses .NET resources?
Using WinXP btw.