MSFN Forum: [SOLVED] Crash Dump VBScript Issues - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[SOLVED] Crash Dump VBScript Issues Rate Topic: -----

#1 User is offline   PeterJackson1986 

  • Group: Members
  • Posts: 7
  • Joined: 20-February 12
  • OS:none specified
  • Country: Country Flag

Posted 20 February 2012 - 01:23 PM

Hi there,

I'm trying to run this script http://www.dumpanaly....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

This post has been edited by PeterJackson1986: 22 February 2012 - 01:44 PM



#2 User is offline   bphlpt 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,077
  • Joined: 12-May 07

Posted 20 February 2012 - 03:42 PM

And just out of curiosity, why didn't you ask this question on the forum where you found the script?

Cheers and Regards

#3 User is offline   CoffeeFiend 

  • Coffee Aficionado
  • Group: Super Moderator
  • Posts: 5,399
  • Joined: 14-July 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 20 February 2012 - 04:13 PM

View PostPeterJackson1986, on 20 February 2012 - 01:23 PM, said:

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

#4 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,363
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 20 February 2012 - 04:14 PM

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.

#5 User is offline   PeterJackson1986 

  • Group: Members
  • Posts: 7
  • Joined: 20-February 12
  • OS:none specified
  • Country: Country Flag

Posted 21 February 2012 - 07:26 AM

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.

#6 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,363
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 21 February 2012 - 07:37 AM

Did you try as I mentioned:

Quote

("""C:\Program Files\Debugging Tools for Windows\WinDbg.exe"" -y


#7 User is offline   PeterJackson1986 

  • Group: Members
  • Posts: 7
  • Joined: 20-February 12
  • OS:none specified
  • Country: Country Flag

Posted 21 February 2012 - 08:39 AM

View PostYzöwl, on 21 February 2012 - 07:37 AM, said:

Did you try as I mentioned:

Quote

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

#8 User is offline   MagicAndre1981 

  • after Windows 7 GA still Vista lover :)
  • Group: Patrons
  • Posts: 4,970
  • Joined: 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Posted 21 February 2012 - 09:02 AM

the script works fine. I only had to change the path to the debugging tools.

#9 User is offline   PeterJackson1986 

  • Group: Members
  • Posts: 7
  • Joined: 20-February 12
  • OS:none specified
  • Country: Country Flag

Posted 21 February 2012 - 09:16 AM

View PostMagicAndre1981, on 21 February 2012 - 09:02 AM, said:

the script works fine. I only had to change the path to the debugging tools.


Sorry I didn't understand ... What path?

#10 User is offline   MagicAndre1981 

  • after Windows 7 GA still Vista lover :)
  • Group: Patrons
  • Posts: 4,970
  • Joined: 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Posted 21 February 2012 - 09:40 AM

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

#11 User is offline   PeterJackson1986 

  • Group: Members
  • Posts: 7
  • Joined: 20-February 12
  • OS:none specified
  • Country: Country Flag

Posted 21 February 2012 - 10:31 AM

View PostMagicAndre1981, on 21 February 2012 - 09:40 AM, said:

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.

This post has been edited by PeterJackson1986: 21 February 2012 - 10:32 AM


#12 User is offline   PeterJackson1986 

  • Group: Members
  • Posts: 7
  • Joined: 20-February 12
  • OS:none specified
  • Country: Country Flag

Posted 21 February 2012 - 11:00 AM

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
$$

This post has been edited by PeterJackson1986: 21 February 2012 - 11:02 AM


#13 User is offline   CoffeeFiend 

  • Coffee Aficionado
  • Group: Super Moderator
  • Posts: 5,399
  • Joined: 14-July 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 21 February 2012 - 05:22 PM

View PostPeterJackson1986, on 21 February 2012 - 11:00 AM, said:

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.

#14 User is offline   PeterJackson1986 

  • Group: Members
  • Posts: 7
  • Joined: 20-February 12
  • OS:none specified
  • Country: Country Flag

Posted 22 February 2012 - 01:32 PM

View PostCoffeeFiend, on 21 February 2012 - 05:22 PM, said:

View PostPeterJackson1986, on 21 February 2012 - 11:00 AM, said:

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


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy