PeterJackson1986 Posted February 20, 2012 Posted February 20, 2012 (edited) Hi there,I'm trying to run this script http://www.dumpanalysis.org/forum/viewtopic.php?f=16&t=101 but it's not working. "C:\Minidump\Crashdump.vbs(13, 5) WshShell.Exec: The system cannot find the file specified." I'm not an expert in VBS but I got a lot of crash dump it will be a help if I get this to work. ' ' UDumps2Txt.vbs ' Set fso = CreateObject("Scripting.FileSystemObject") Set Folder = fso.GetFolder(".") Set Files = Folder.Files Set WshShell = CreateObject("WScript.Shell") For Each File In Files Set oExec = WshShell.Exec("C:\Program Files\Debugging Tools for Windows\WinDbg.exe -y ""srv*c:\mss*http://msdl.microsoft.com/download/symbols"" -z " + File.Name + " -c ""$$><c:\scripts\UDmp2Txt.txt;q"" -Q -QS -QY –QSY") Do While oExec.Status = 0 WScript.Sleep 1000 Loop Next ' ' UDumps2Txt.vbs: End of File 'Thanks,PJ Edited February 22, 2012 by PeterJackson1986
bphlpt Posted February 20, 2012 Posted February 20, 2012 And just out of curiosity, why didn't you ask this question on the forum where you found the script?Cheers and Regards
CoffeeFiend Posted February 20, 2012 Posted February 20, 2012 "C:\Minidump\Crashdump.vbs(13, 5) WshShell.Exec: The system cannot find the file specified."This is usually a very good description of the problem. Does C:\Program Files\Debugging Tools for Windows\WinDbg.exe actually exist? Because it says it can't find it. Obviously WinDbg has to be installed, and that's not the proper path for it if you're running a x64 version of Windows either.
Yzöwl Posted February 20, 2012 Posted February 20, 2012 Have you tried using additional double quotes to cater for the path to WinDbg containing spaces?'C:\Program' may be the file the system cannot find.
PeterJackson1986 Posted February 21, 2012 Author Posted February 21, 2012 Yes I have made sure the Windbg path is correct. If I run command directly in command prompt it works it opens the Windows Debugger and run the script. (Though I want the output to a text file)C:\Program Files\Debugging Tools for Windows\windbg.exe -y "srv*c:\ms*http://msdl.microsoft.com/download/symbols" -z c:\Minidump\Mini013112-03.dmp -c "!analyze -v" -Q -QS -QY -QSY But the reason is someone we i have to run around 20 to 30 dump files so it would be helpful if I can automate the process. That forum no one has posted in that forum since like 2008 so i doubt if anyone would replay.
Yzöwl Posted February 21, 2012 Posted February 21, 2012 Did you try as I mentioned:("""C:\Program Files\Debugging Tools for Windows\WinDbg.exe"" -y
PeterJackson1986 Posted February 21, 2012 Author Posted February 21, 2012 Did you try as I mentioned:("""C:\Program Files\Debugging Tools for Windows\WinDbg.exe"" -y Thanks just added it ' ' UDumps2Txt.vbs ' Set fso = CreateObject("Scripting.FileSystemObject") Set Folder = fso.GetFolder(".") Set Files = Folder.Files Set WshShell = CreateObject("WScript.Shell") For Each File In Files Set oExec = WshShell.Exec(""C:Windbg\WinDbg.exe" -y ""srv*c:\mss*http://msdl.microsoft.com/download/symbols"" -z " + File.Name + " -c ""$$><c:\scripts\UDmp2Txt.txt;q"" -Q -QS -QY –QSY") Do While oExec.Status = 0 WScript.Sleep 1000 Loop Next ' ' UDumps2Txt.vbs: End of File 'Next error "C:\scripts\UDumps2Txt.vbs(9, 35) Microsoft VBScript compilation error: Expected ')'"
MagicAndre1981 Posted February 21, 2012 Posted February 21, 2012 the script works fine. I only had to change the path to the debugging tools.
PeterJackson1986 Posted February 21, 2012 Author Posted February 21, 2012 the script works fine. I only had to change the path to the debugging tools.Sorry I didn't understand ... What path?
MagicAndre1981 Posted February 21, 2012 Posted February 21, 2012 Debugging tool Path You have a mistake in your path C:\WInDbg
PeterJackson1986 Posted February 21, 2012 Author Posted February 21, 2012 (edited) Debugging tool Path You have a mistake in your path C:\WInDbgThanks correct. But same error C:\scripts\UDumps2Txt.vbs(9, 35) Microsoft VBScript compilation error: Expected ')'Could you attach the vb script that's working for you? Maybe I can try that one. Edited February 21, 2012 by PeterJackson1986
PeterJackson1986 Posted February 21, 2012 Author Posted February 21, 2012 (edited) Ok got it to work .. No error message .. But no output Set fso = CreateObject("Scripting.FileSystemObject") Set Folder = fso.GetFolder("C:\Minidump") Set Files = Folder.Files Set WshShell = CreateObject("WScript.Shell") For Each File In Files If File.Name = ".dmp" Then Set oExec = WshShell.Exec("C:\Windbg\WinDbg.exe -y ""srv*c:\ms*http://msdl.microsoft.com/download/symbols"" -z " + File.Name + " -c ""$$><c:\scripts\MiniDmp2Txt.txt; q"" -Q -QS -QY -QSY") Do While oExec.Status = 0 WScript.Sleep 1000 Loop End If Next 'ENDAlso created that txt file $$$$ UDmp2Txt: Dump information from user dump into log$$.logopen /d!analyze -v!locks~*kvlmv.logclose$$$$ UDmp2Txt: End of File$$ Edited February 21, 2012 by PeterJackson1986
CoffeeFiend Posted February 21, 2012 Posted February 21, 2012 Ok got it to work .. No error message .. But no output and that makes perfect sense too: If File.Name = ".dmp" Then...unless all of your files are called .dmp (no filename at all, just an extension). If your crash dump files have standard names (a filename and an extension) then it'll never even try to start windbg, so no output.
PeterJackson1986 Posted February 22, 2012 Author Posted February 22, 2012 Ok got it to work .. No error message .. But no output and that makes perfect sense too: If File.Name = ".dmp" Then...unless all of your files are called .dmp (no filename at all, just an extension). If your crash dump files have standard names (a filename and an extension) then it'll never even try to start windbg, so no output.Spot on ... Great work mate ... Just got it to work I altered the script to Set fso = CreateObject("Scripting.FileSystemObject") Set Folder = fso.GetFolder("C:\Minidump") Set Files = Folder.Files Set WshShell = CreateObject("WScript.Shell") For Each File In Files Set oExec = WshShell.Exec("C:\Windbg\WinDbg.exe -y ""srv*c:\ms*http://msdl.microsoft.com/download/symbols"" -z " + File.Name + " -c ""$$><c:\scripts\MiniDmp2Txt.txt; q"" -Q -QS -QY -QSY") Do While oExec.Status = 0 WScript.Sleep 1000 Loop Next
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now