Need Batch File Help

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

HockeyGirl86

Thread Starter
Joined
Oct 29, 2011
Messages
1
Hello everyone,

I am trying to write a batch file for my OS class and I'm not sure what the professor is asking for is possible. We are required to write a batch file that gathers specific info from the "SYSTEMINFO" command and redirects it to a file, but the following requirement has me and my lab partner stumped:

"While executing this batch file (when systeminfo is ‘gathering’ information) a “Loading..” message appears on the screen. Modify the batch file so the “Loading Message” does not appear on the screen when the batch file runs. The message should be redirected to the nul device."

We've tried every thing we can thing of to redirect or hide the "Loading Message" from the screen, but nothing seems to work. Is this even possible to do? We've tried every combination of:

> nul
0> nul
1> nul
2> nul

Any ideas? :confused:
 

Squashman

Retired Trusted Advisor
Joined
Apr 4, 2003
Messages
19,786
Redirecting standard error to NUL most definitely gets rid of it so I am not sure why it is not working for you.
 

Squashman

Retired Trusted Advisor
Joined
Apr 4, 2003
Messages
19,786
This is how I would do it.

Code:
for /f "tokens=*" %%I in ('systeminfo ^2^>nul') do echo %%I>>%COMPUTERNAME%.txt
 
Joined
Apr 12, 2003
Messages
23
Did you try this?

Code:
systeminfo >> systeminfo.txt 2>nul
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top