Net.exe Can Use Hidden Switches /Y /N for Unconditional Yes/No (156458)
The information in this article applies to:
- Microsoft Windows NT Advanced Server 3.1
- Microsoft Windows NT Workstation 3.1
- Microsoft Windows NT Workstation 3.5
- Microsoft Windows NT Workstation 3.51
- Microsoft Windows NT Workstation 4.0
- Microsoft Windows NT Server 3.1
- Microsoft Windows NT Server 3.5
- Microsoft Windows NT Server 3.51
- Microsoft Windows NT Server 4.0
This article was previously published under Q156458 SUMMARY
When you use Net.exe commands in a batch file, you can use the Y or N
switch to unconditionally answer Yes or No to questions returned by the Net
command.
WORKAROUND
Change your batch file to include the Y switch to unconditionally answer
Yes to the question "Do you want to continue this operation? (Y/N) [N]:"
Delshare.bat new contents:
NET SHARE TOOLS /D /Y
After running this batch file, you will receive the following message:
NET SHARE TOOLS /D /y
Users have open files on TOOLS. Continuing the operation will force the
files closed.
TOOLS was deleted successfully.
Modification Type: | Major | Last Reviewed: | 3/29/2004 |
---|
Keywords: | kbusage KB156458 |
---|
|