我尝试在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.
答案 0 :(得分:2)
net share ServerShare_XXX /delete /yes