Hello, I need my program to be able to add credentials in Credential manager in Windows 7. I have used the "net use x: \\servername\sharename /savecred' Command, but it doesn't seem very clean and I am not always guaranteed that it works as sometimes CMD hangs. I see there is an API to add credentials on the MSDN site called CredWrite. I have made my best attempt to get this to work, but I am not having much luck. I am hoping someone can look at my code and help point me in the right direc
I was able to use that code to do CredWrite successfully and even got CredDelete to work, but I can't get CredRead to work.
You can see the entry written appear in windows control panel->credential manager.
Here is what I have so far:
#include <array.au3>
;~ CredWrite("MeinServer", "MeineDomain\MeinUser", "MeinPWD", "mein Kommentar")
;~ CredDelete("MeinServer")
CredRead("MeinServer")
Func CredRead($Target)
Local $targetName = DllStructCreate("wchar[100]")
DllStructSetData($tar