1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Need Batch File Help

Discussion in 'DOS/Other' started by HockeyGirl86, Oct 29, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. HockeyGirl86

    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:
     
  2. Squashman

    Squashman 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.
     
  3. Squashman

    Squashman 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
     
  4. TP109

    TP109

    Joined:
    Apr 12, 2003
    Messages:
    23
    Did you try this?

    Code:
    systeminfo >> systeminfo.txt 2>nul
     
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 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1024610

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice