自动回答Y窗口命令net share / delete

时间:2017-04-18 08:03:56

标签: windows cmd

我尝试在Windows中自动回答net命令。

echo Y | net share /delete ServerShare_XXX

net share /delete ServerShare_XXX && echo y

我无法确认自动回答y。请帮帮我。

C:\WINDOWS\system32>echo y | net share /delete ServerShare_XXX
Users have open files on ServerShare_XXX.  Continuing the operation will force the files closed.

Do you want to continue this operation? (Y/N) [N]:
No valid response was provided.

1 个答案:

答案 0 :(得分:2)

net share ServerShare_XXX /delete /yes