Search the Community
Showing results for tags '@commspec'.
-
Hello, I am checking code with Microsoft BinScope 2014. It runs in a command line. You may be familiar with it if you are testing security for DLLs. Anyway, I get a directory of .DLL and corresponding Symbol .PDB files from developers. The .dll and .pdb filenames have to match to run BinScope on them. I create an array of DLL files, then an array of PDB files, compare the files to make sure I am only testing matching filenames, and then running them through BinScope. I have the automated script running but because I am having problem with @ComSpec, I am using Run("CMD.exe"). It leaves a DOS box for every file. Here is some code: For $i = $iDllCount to $aTestDllList[1] $iDllCount += 1 $sCmd = "Binscope "&$sPath&$sDllFile ;MsgBox($MB_OK,"","File to test is "&$sDllFile&" DLLCount is "&$iDllCount) Run("CMD.exe","") Sleep(500) Send("CD C:\Program Files\Microsoft BinScope 2014\{Enter}") Sleep(500) Send($sCmd&"{Enter}") ;RunWait(@ComSpec & " /c " & "Binscope /Target "&$sDllFile,'""C:\Program Files\Microsoft BinScope 2014\""') Commented out Next If I could use RunWait(@ComSpec " /c "... the DOS box would close automatically. However I can't get that to work. I have tried RunWait(@ComSpec&" /k "&'""Binscope.exe C:\testdll\apiREST.dll""', '""C:\Program Files\Microsoft BinScope 2014""') RunWait(@ComSpec&" /k "&'""C:\Program Files\Microsoft BinScope 2014\Binscope.exe C:\testdll\apiREST.dll""', '""C:\Program Files\Microsoft BinScope 2014""') In any case using the RunWait command does not work. Using Run("CMD.exe") does. I would like to close the DOS box after each file is run. I need to either get RunWait (@ComSpec...) running OR close each DOS box after BinScope is done. Any help is appreciated! JibsMan