hiding net use command in login script
I'm trying to write a login script and stop the statements from showing up on the screen
@net use h: /delete (does not work)
@net use h: \\home\local (works fine)
any suggestions out there ?
Windows Forum
I'm trying to write a login script and stop the statements from showing up on the screen
@net use h: /delete (does not work)
@net use h: \\home\local (works fine)
any suggestions out there ?
by james.pounds
piping the commands to the "nul" operator will definitely work:
ie. "@net use h: /delete > nul"
Using the directive to turn off echoing to the console will also work. Use the command "echo off" on a line to prevent further commands being echoed to the active console and use the "echo on" command to turn echo back on. It would look like this in your logon script:
echo off
@net use h: /delete
@net use h: \\home\local
echo on
by jsarinana
by james.pounds
BTW
If you want to suppress the display of the echo off and on commands you can pipe those to the nul operator like this:
echo off > nul
rem YOUR CODE HERE WILL NOT APPEAR
echo on > nul
by jsarinana
This discussion is closed to new replies.
Sort by Trending