Jump to content

Recommended Posts

Posted (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 by PeterJackson1986

Posted

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

Posted

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.

Posted

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.

Posted

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

Posted (edited)

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
Posted (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
'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
Posted

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.

Posted

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

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