|
| ||||||||||
| Tags: delete, hide, net, output |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| how do I hide a output of a net use /delete
exist I see a error message. How do I hide the messages? I have tried piping output to nul or a file but I still see the error message. What am I missing c:\net use i: /delete>NUL Example C:\net use i: /delete The network connection could not be found. More help is available by typing NET HELPMSG 2250. or C:\net use i: /delete>NUL The network connection could not be found. More help is available by typing NET HELPMSG 2250. |
|
#2
| |||
| |||
| Re: how do I hide a output of a net use /delete
AdminKen wrote: > I have a login script that deletes drive mappings. If the drives are do not > exist I see a error message. How do I hide the messages? > > I have tried piping output to nul or a file but I still see the error > message. What am I missing > > c:\net use i: /delete>NUL > > Example > C:\net use i: /delete > The network connection could not be found. > More help is available by typing NET HELPMSG 2250. > > or > C:\net use i: /delete>NUL > The network connection could not be found. > More help is available by typing NET HELPMSG 2250. > The short answer is use "2>NUL", like this: C:\>net.exe use i: /delete >NUL 2>NUL Most programs send their output to the stdout stream, which is represented by handle 1, or assumed if not present. So what you were doing is the same as this: C:\>net.exe use i: /delete 1>NUL Some programs separate their output, they send informational messages to stdout, and errors to stderr, represented by handle 2. You could also stderr (handle 2) to the same place as stdout (handle 1), like this: C:\>net.exe use i: /delete 1>NUL 2>&1 For more information click Start -> Help and Support, and search for "using command redirection operators" |
|
#3
| |||
| |||
| RE: how do I hide a output of a net use /delete
Try this: net use i: /delete 2>NUL >NUL that should redirect both stdout & stderr ~Jeremy "AdminKen" wrote: > I have a login script that deletes drive mappings. If the drives are do not > exist I see a error message. How do I hide the messages? > > I have tried piping output to nul or a file but I still see the error > message. What am I missing > > c:\net use i: /delete>NUL > > Example > C:\net use i: /delete > The network connection could not be found. > More help is available by typing NET HELPMSG 2250. > > or > C:\net use i: /delete>NUL > The network connection could not be found. > More help is available by typing NET HELPMSG 2250. > > > |
|
#4
| |||
| |||
| Re: how do I hide a output of a net use /delete
that worked thanks "J Ford" <JFord@discussions.microsoft.com> wrote in message news:4FF4DBB1-B3C6-438E-910E-1FD411E977B0@microsoft.com... > Try this: > > net use i: /delete 2>NUL >NUL > > that should redirect both stdout & stderr > > ~Jeremy > > "AdminKen" wrote: > >> I have a login script that deletes drive mappings. If the drives are do >> not >> exist I see a error message. How do I hide the messages? >> >> I have tried piping output to nul or a file but I still see the error >> message. What am I missing >> >> c:\net use i: /delete>NUL >> >> Example >> C:\net use i: /delete >> The network connection could not be found. >> More help is available by typing NET HELPMSG 2250. >> >> or >> C:\net use i: /delete>NUL >> The network connection could not be found. >> More help is available by typing NET HELPMSG 2250. >> >> >> |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "how do I hide a output of a net use /delete" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Internet Explorer 9 wont delete cookies when set to delete all history on exit | Ritesh Singh | Technology & Internet | 5 | 06-05-2012 08:19 AM |
| How to delete files that appear in find command's output in Linux | jAYASENA | Operating Systems | 6 | 27-05-2011 10:20 AM |
| Tips to hide the delete option of Recycle bin | Brendan18 | Tips & Tweaks | 1 | 27-05-2011 06:14 AM |
| Can I hide or delete the Q drive? | Kaustubh m | Windows Software | 6 | 30-07-2010 09:25 AM |
| Auto-Hide toolbar won't hide? | Geoff from LA | Vista Help | 8 | 18-10-2009 06:52 AM |