At my work we use an NT4 domain with login scripts for every user.
They look somthing like:
net use g: \\server\share1
net use h: \\server\share2
We wanted to hide the output...
For example "The command completed successfully"
So we added:
net use g: \\server\share1 >nul
net use h: \\server\share2 >nul
This works fine as far as the "The command completed successfully"
message goes. The problem is once the user has logged in once they get
a message saying:
"System error 85 has occurred.
The local device name is already in use."
I want to use the net use ... >nul command but I want NO OUTPUT AT
ALL. Even if the drive failes to map for some reason. I know all about
the net use /p:no option but I want something like >nul but that does
not display anything to the screen. Hope you know what I mean.
Thanks for your time
Paul
Have you tried redirecting both STDERR (channel 2) and STDIN
(channel 1) to NUL? Typical syntax for example DIR command:
DIR ::nofile >NUL 2>&1
--
William and Linda Allen
Creative Technical Writing - Allen & Company: http://www.allenware.com/
Free MS-DOS Batch File Course http://www.allenware.com/find?BatchCourse
Have you tried redirecting both STDERR (channel 2) and STDOUT
What you want to hide is stderr, or #2, so try this:
net use g: \\server\share1 >nul 2>nul
Or to get the same effect you can redirect 2 to the same place as 1, which
would look like this:
net use g: \\server\share1 >nul 2>&1
Of course all these hide any real error messages, like 53 if the server is
not available or 5 for access is denied.
"Paul" <thef...@aol.com> wrote in message
news:a17835b8.03042...@posting.google.com...
The simple solution would be to direct the STDERR to a file.
Just what I needed.
Paul