Jump to content

[SOLVED] Crash Dump VBScript Issues


Recommended Posts

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 by PeterJackson1986
Link to comment
Share on other sites


"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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ')'"

Link to comment
Share on other sites

Debugging tool Path ;) You have a mistake in your path C:\WInDbg

Thanks 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 by PeterJackson1986
Link to comment
Share on other sites

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
'END

Also created that txt file

$$
$$ UDmp2Txt: Dump information from user dump into log
$$
.logopen /d
!analyze -v
!locks
~*kv
lmv
.logclose
$$
$$ UDmp2Txt: End of File
$$

Edited by PeterJackson1986
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...