In WinXP (SP2), you can store connected network passwords ...
Start-> Control Panel-> User Accounts-> Select one of them, then select "Manage My Network Passwords" from the related tasks.
I usually have about 25-30 servers mapped in this way with several different accounts / domains. The problem is that at some point during our policy updates they are erased, and this is the real PITA to add them back again.
Does anyone know how to add them programmatically using some kind of script?
Just to clarify, the ultimate goal is not to map drives, but to actually create records in this section. This allows us to use Windows authentication to connect to our servers (through Dameware, SSMS, etc.).
Addendum:
CredWrite mark brought me here ...
pinvoke.net - CredWrite (advapi32)
Which, in turn, brought me here ...
Peer Channel Blog - Application Password Security
Both were very helpful.
source
share