PC Review


Reply
Thread Tools Rate Thread

Batch file - additional input lines to called program

 
 
Bob F
Guest
Posts: n/a
 
      1st Apr 2009
It has been 15 years since I wrote batch files.
I am trying to make a batch file to do the following

To extract useful information out of the minidump file created:
1.. Open a command prompt (Start -> Run -> "cmd")
2.. cd \program files\debugging tools (Or wherever they are installed to)
3.. kd -z C:\debug\Mini???????-??.dmp
4.. kd> .logopen c:\debuglog.txt
5.. kd> .sympath srv*c:\symbols*http://msdl.microsoft.com/download/symbols
6.. kd> .reload;!analyze -v;r;kv;lmnt;.logclose;q
7.. You now have a debuglog.txt in c:\, open it in a text edit (Notepad?).
I created the following batch file.

cd "c:\program files\debugging tools for windows (x86)"

kd -z c:\debug\%1
..logopen C:\debug\debuglog.txt
..sympath srv*c:\symbols*http://msdl.microsoft.com/download/symbols
..reload;!analyze -v;r;kv;lmnt;.logclose;q
cd c:\debug

The line starting with "kd" executes. The command prompt 0: kd> is displayed,
and the additional lines are not executed by kd.exe.

Can anyone tell me how to make this work?

Many thanks


 
Reply With Quote
 
 
 
 
Pegasus [MVP]
Guest
Posts: n/a
 
      1st Apr 2009

"Bob F" <(E-Mail Removed)> wrote in message
news:gr0obi$gio$(E-Mail Removed)...
> It has been 15 years since I wrote batch files.
> I am trying to make a batch file to do the following
>
> To extract useful information out of the minidump file created:
> 1.. Open a command prompt (Start -> Run -> "cmd")
> 2.. cd \program files\debugging tools (Or wherever they are installed to)
> 3.. kd -z C:\debug\Mini???????-??.dmp
> 4.. kd> .logopen c:\debuglog.txt
> 5.. kd> .sympath
> srv*c:\symbols*http://msdl.microsoft.com/download/symbols
> 6.. kd> .reload;!analyze -v;r;kv;lmnt;.logclose;q
> 7.. You now have a debuglog.txt in c:\, open it in a text edit
> (Notepad?).
> I created the following batch file.
>
> cd "c:\program files\debugging tools for windows (x86)"
>
> kd -z c:\debug\%1
> .logopen C:\debug\debuglog.txt
> .sympath srv*c:\symbols*http://msdl.microsoft.com/download/symbols
> .reload;!analyze -v;r;kv;lmnt;.logclose;q
> cd c:\debug
>
> The line starting with "kd" executes. The command prompt 0: kd> is
> displayed, and the additional lines are not executed by kd.exe.
>
> Can anyone tell me how to make this work?
>
> Many thanks


I don't know anything about kd.exe but if it accepts piped input then this
should work:

@echo off
cd /d "c:\program files\debugging tools for windows (x86)"

echo> kd.scr .logopen C:\debug\debuglog.txt
echo>> kd.scr .sympath
srv*c:\symbols*http://msdl.microsoft.com/download/symbols
echo>> kd.scr .reload;!analyze -v;r;kv;lmnt;.logclose;q

kd -z c:\debug\%1 < kd.scr
cd /d c:\debug


 
Reply With Quote
 
Bob F
Guest
Posts: n/a
 
      2nd Apr 2009
Pegasus [MVP] wrote:
> "Bob F" <(E-Mail Removed)> wrote in message
> news:gr0obi$gio$(E-Mail Removed)...
>> It has been 15 years since I wrote batch files.
>> I am trying to make a batch file to do the following
>>
>> To extract useful information out of the minidump file created:
>> 1.. Open a command prompt (Start -> Run -> "cmd")
>> 2.. cd \program files\debugging tools (Or wherever they are
>> installed to) 3.. kd -z C:\debug\Mini???????-??.dmp
>> 4.. kd> .logopen c:\debuglog.txt
>> 5.. kd> .sympath
>> srv*c:\symbols*http://msdl.microsoft.com/download/symbols
>> 6.. kd> .reload;!analyze -v;r;kv;lmnt;.logclose;q
>> 7.. You now have a debuglog.txt in c:\, open it in a text edit
>> (Notepad?).
>> I created the following batch file.
>>
>> cd "c:\program files\debugging tools for windows (x86)"
>>
>> kd -z c:\debug\%1
>> .logopen C:\debug\debuglog.txt
>> .sympath srv*c:\symbols*http://msdl.microsoft.com/download/symbols
>> .reload;!analyze -v;r;kv;lmnt;.logclose;q
>> cd c:\debug
>>
>> The line starting with "kd" executes. The command prompt 0: kd> is
>> displayed, and the additional lines are not executed by kd.exe.
>>
>> Can anyone tell me how to make this work?
>>
>> Many thanks

>
> I don't know anything about kd.exe but if it accepts piped input then
> this should work:
>
> @echo off
> cd /d "c:\program files\debugging tools for windows (x86)"
>
> echo> kd.scr .logopen C:\debug\debuglog.txt
> echo>> kd.scr .sympath
> srv*c:\symbols*http://msdl.microsoft.com/download/symbols
> echo>> kd.scr .reload;!analyze -v;r;kv;lmnt;.logclose;q
>
> kd -z c:\debug\%1 < kd.scr
> cd /d c:\debug


Just what I needed. Thanks.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch file user input ?? Richard Windows XP General 3 19th Oct 2006 02:12 AM
Batch file command lines for CD =?Utf-8?B?RkwgQ29uc3VsdGFudA==?= Microsoft Windows 2000 Networking 7 21st Jun 2005 08:01 PM
batch command doesn't work if called by another batch jonefer Windows XP General 3 20th Nov 2003 05:35 PM
batch rename acording to lines in a text file... Google's friend Freeware 0 4th Sep 2003 04:05 PM
Input variables on Sheet1 being called by a VB program on Sheet 2 RU42 Microsoft Excel Programming 1 23rd Aug 2003 09:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:29 AM.