G
Guest
Hej
I want to read the current Login at XP user Login to my C# Windows program.
I know how to use Namespace Microsoft.win32 and registryKey and Registry
class but I got a string i REG_SZ format not in normal Uni16 format by use
this little picse of code.
RegistryKey user = Registry.CurrentUser;
RegistryKey userid = user.OpenSubKey("Identities");
string UserIDStr = (string ) userid.GetValue("Last User ID");
user.Close();
So how to read the PC user Login in my proram so the user don't have to
write he/hers User ID again then they use the programmet beause I have to
store the users ID in a file
Best regard
Kim S.
I want to read the current Login at XP user Login to my C# Windows program.
I know how to use Namespace Microsoft.win32 and registryKey and Registry
class but I got a string i REG_SZ format not in normal Uni16 format by use
this little picse of code.
RegistryKey user = Registry.CurrentUser;
RegistryKey userid = user.OpenSubKey("Identities");
string UserIDStr = (string ) userid.GetValue("Last User ID");
user.Close();
So how to read the PC user Login in my proram so the user don't have to
write he/hers User ID again then they use the programmet beause I have to
store the users ID in a file
Best regard
Kim S.