I have an script that keeps running, under some scenarios, it needs to contact a server (\\us-sign). From time to time, if this server remains uncontacted for a while, the next time my script needs it, it will ask for my credentials.

What I found is that, after such thing happening and using net use, such server will be displayed as disconnected. if I type "net use \\us-sign", it won't ask me neither user nor password, what makes me believe, my credentials for such server are still "valid", nonetheless, its status will remain "disconnected".

This script is supposed to help us automate some procedures, but the need to keep a watch on it shall it request for credentials, it kind of defeats the purpose.

How can I keep its status "OK" no matter how long it is not being contacted?


NET CONFIG /SERVER autodisconnect:-1

  • I don't have edit privileges here, but this should be "net config server /autodisconnect:-1". Otherwise, +1 for a command that is going to be useful for me! – Stephen Jennings Jul 5 '10 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.