Technology Questions

Go Back   Technology Questions > Software Questions > Operating System Questions > Windows XP

Windows XP Discuss the Microsoft Windows XP Operating System

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 01-04-2007, 05:59 AM
Michael Sadler
Newsgroup Contributor
 
Posts: n/a
Output of findstr

I ran findstr on my XP box and I noticed that the text that spewed to the
console was a mix of highlighted text and regular text. I didn't think that
that was possible without (the old and no longer used) ANSI.SYS. How was
this highlighted text acheived?
--

Love,
Michael
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 01-04-2007, 05:59 AM
  #2 (permalink)  
Old 01-04-2007, 05:59 AM
Bob I
Newsgroup Contributor
 
Posts: n/a
Re: Output of findstr

Did you look?
C:\Windows\system32\ansi.sys

Michael Sadler wrote:

> I ran findstr on my XP box and I noticed that the text that spewed to the
> console was a mix of highlighted text and regular text. I didn't think that
> that was possible without (the old and no longer used) ANSI.SYS. How was
> this highlighted text acheived?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 01-04-2007, 05:59 AM
Michael Sadler
Newsgroup Contributor
 
Posts: n/a
Re: Output of findstr

But the docs say

"ANSI.SYS can be loaded and used from the command prompt, with the
restriction that it can run only in the context of the MS-DOS subsystem.
Windows NT does not support ANSI escape sequences in Win32 Console
applications."

and findstr is being run from within CMD.exe

I tried to configure a config.nt and run a command.com shell. I tried to
send an escape sequence to the screen and nothing.

regardless, findstr is being run in a CMD.exe shell. How is that acheived?
--

Love,
Michael


"Bob I" wrote:

> Did you look?
> C:\Windows\system32\ansi.sys
>
> Michael Sadler wrote:
>
> > I ran findstr on my XP box and I noticed that the text that spewed to the
> > console was a mix of highlighted text and regular text. I didn't think that
> > that was possible without (the old and no longer used) ANSI.SYS. How was
> > this highlighted text acheived?

>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 01-04-2007, 05:59 AM
Jon
Newsgroup Contributor
 
Posts: n/a
Re: Output of findstr



I have it on good authority that "Michael Sadler"
<MichaelSadler@discussions.microsoft.com> said in
news:41E4F2FE-6748-495C-B32A-E844644787E9@microsoft.com...
> But the docs say
>
> "ANSI.SYS can be loaded and used from the command prompt, with the
> restriction that it can run only in the context of the MS-DOS subsystem.
> Windows NT does not support ANSI escape sequences in Win32 Console
> applications."
>
> and findstr is being run from within CMD.exe
>
> I tried to configure a config.nt and run a command.com shell. I tried to
> send an escape sequence to the screen and nothing.
>
> regardless, findstr is being run in a CMD.exe shell. How is that
> acheived?
> --
>
> Love,
> Michael
>
>
> "Bob I" wrote:
>
>> Did you look?
>> C:\Windows\system32\ansi.sys
>>
>> Michael Sadler wrote:
>>
>> > I ran findstr on my XP box and I noticed that the text that spewed to
>> > the
>> > console was a mix of highlighted text and regular text. I didn't think
>> > that
>> > that was possible without (the old and no longer used) ANSI.SYS. How
>> > was
>> > this highlighted text acheived?

>>
>>


findstr.exe itself is an external program to cmd.exe (located in
c:\windows\system32), and as such it can pretty much do as it pleases.

--
Jon


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 01-04-2007, 06:01 AM
Wesley Vogel
Newsgroup Contributor
 
Posts: n/a
Re: Output of findstr

Autoexec.nt & Config.nt only affect command.com.

All commands typed in command.com are executed in cmd.exe.

<quote>
Remarks
Use the systemroot\System32\Config.nt file, or the equivalent startup file
specified in a program's program information file (PIF), to load device
drivers for the MS-DOS subsystem.

To use an ANSI escape sequence to control the screen and keyboard for the
MS-DOS subsystem, type the following in your Config.nt or equivalent startup
file:

device=c:\winnt\system32\ansi.sys
or
device=c:\windows\system32\ansi.sys
<quote>

Paste the following line into Start | Run and click OK...
hh ntcmds.chm::/device.htm

<quote>
If you want to use conventional keyboard functions even though you are using
an enhanced keyboard, add the following command to your Config.nt file:

switches=/k
<quote>

Paste the following line into Start | Run and click OK...
hh ntcmds.chm::/switches.htm

How to Enable ANSI.SYS in a Command Window
http://support.microsoft.com/kb/101875


--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In news:41E4F2FE-6748-495C-B32A-E844644787E9@microsoft.com,
Michael Sadler <MichaelSadler@discussions.microsoft.com> hunted and pecked:
> But the docs say
>
> "ANSI.SYS can be loaded and used from the command prompt, with the
> restriction that it can run only in the context of the MS-DOS subsystem.
> Windows NT does not support ANSI escape sequences in Win32 Console
> applications."
>
> and findstr is being run from within CMD.exe
>
> I tried to configure a config.nt and run a command.com shell. I tried to
> send an escape sequence to the screen and nothing.
>
> regardless, findstr is being run in a CMD.exe shell. How is that
> acheived? --
>
> Love,
> Michael
>
>
> "Bob I" wrote:
>
>> Did you look?
>> C:\Windows\system32\ansi.sys
>>
>> Michael Sadler wrote:
>>
>>> I ran findstr on my XP box and I noticed that the text that spewed to
>>> the console was a mix of highlighted text and regular text. I didn't
>>> think that that was possible without (the old and no longer used)
>>> ANSI.SYS. How was this highlighted text acheived?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #6 (permalink)  
Old 01-04-2007, 06:02 AM
Wesley Vogel
Newsgroup Contributor
 
Posts: n/a
Re: Output of findstr

Autoexec.nt & Config.nt only affect command.com.

All commands typed in command.com are executed in cmd.exe.

<quote>
Remarks
Use the systemroot\System32\Config.nt file, or the equivalent startup file
specified in a program's program information file (PIF), to load device
drivers for the MS-DOS subsystem.

To use an ANSI escape sequence to control the screen and keyboard for the
MS-DOS subsystem, type the following in your Config.nt or equivalent startup
file:

device=c:\winnt\system32\ansi.sys
or
device=c:\windows\system32\ansi.sys
<quote>

Paste the following line into Start | Run and click OK...
hh ntcmds.chm::/device.htm

<quote>
If you want to use conventional keyboard functions even though you are using
an enhanced keyboard, add the following command to your Config.nt file:

switches=/k
<quote>

Paste the following line into Start | Run and click OK...
hh ntcmds.chm::/switches.htm

How to Enable ANSI.SYS in a Command Window
http://support.microsoft.com/kb/101875


--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In news:41E4F2FE-6748-495C-B32A-E844644787E9@microsoft.com,
Michael Sadler <MichaelSadler@discussions.microsoft.com> hunted and pecked:
> But the docs say
>
> "ANSI.SYS can be loaded and used from the command prompt, with the
> restriction that it can run only in the context of the MS-DOS subsystem.
> Windows NT does not support ANSI escape sequences in Win32 Console
> applications."
>
> and findstr is being run from within CMD.exe
>
> I tried to configure a config.nt and run a command.com shell. I tried to
> send an escape sequence to the screen and nothing.
>
> regardless, findstr is being run in a CMD.exe shell. How is that
> acheived? --
>
> Love,
> Michael
>
>
> "Bob I" wrote:
>
>> Did you look?
>> C:\Windows\system32\ansi.sys
>>
>> Michael Sadler wrote:
>>
>>> I ran findstr on my XP box and I noticed that the text that spewed to
>>> the console was a mix of highlighted text and regular text. I didn't
>>> think that that was possible without (the old and no longer used)
>>> ANSI.SYS. How was this highlighted text acheived?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
No Output Device Tom Windows Vista 5 06-14-2008 12:40 PM
findstr Jason Sands Windows XP 2 08-06-2007 05:30 AM
Using FINDSTR and regex for searchnig ScottD83 Windows XP 5 03-13-2007 04:00 AM
low volume output tonio Windows Media 0 03-12-2007 02:17 PM
findstr textminer Windows XP 3 03-02-2007 04:30 PM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 04:21 AM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0