how to save credentials of network shares in windows
Whenever we try to access a network share it will prompt for credentials based on the shared folder settings.
Like the below prompt
Once you save them, they are saved in Windows Credentials of Credentials Manager in Control panel (run --> control keymgr.dll).
But not able to found exact file or registry for this setting.
So, can anyone suggest how to do this process of adding network credentials using scripting.
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
SMal.tmcc
7 years ago
you would use the "net use" command and add the persistent switch.
/persistent: { yes | no } : Controls the use of persistent network connections. The default is the setting used last. Deviceless connections are not persistent. Yes saves all connections as they are made, and restores them at next logon. No does not save the connection being made or subsequent connections. Existing connections are restored at the next logon. Use /delete to remove persistent connections.
http://ss64.com/nt/net-use.html
https://technet.microsoft.com/en-us/library/bb490717.aspx
since you marked autoit
https://www.autoitscript.com/autoit3/docs/functions/DriveMapAdd.htm
https://www.autoitscript.com/forum/topic/135018-net-use-drive-mapping/
/persistent: { yes | no } : Controls the use of persistent network connections. The default is the setting used last. Deviceless connections are not persistent. Yes saves all connections as they are made, and restores them at next logon. No does not save the connection being made or subsequent connections. Existing connections are restored at the next logon. Use /delete to remove persistent connections.
http://ss64.com/nt/net-use.html
https://technet.microsoft.com/en-us/library/bb490717.aspx
since you marked autoit
https://www.autoitscript.com/autoit3/docs/functions/DriveMapAdd.htm
https://www.autoitscript.com/forum/topic/135018-net-use-drive-mapping/