Support > General Discussions

module NT

(1/2) > >>

Script_test:
Hi
How to obtain the user name in Windows 10 that is currently active?


--- Code: ---Import "nt.bas"
print nt::RegRead("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Authentication\\LogonUI\\SessionData\\1\\LoggedOnUser")

->undef<-

--- End code ---

I need to retrieve this registry key ["LoggedOnUser"]

thanks for your help

Support:
I don't have Windows 10 to test this. Are you sure the registry key you are after is is really there? Can you access any other registry keys?

Script_test:

--- Quote from: Script_test on October 14, 2016, 04:06:39 AM ---Hi
How to obtain the user name in Windows 10 that is currently active?


--- Code: ---Import "nt.bas"
print nt::RegRead("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Authentication\\LogonUI\\SessionData\\1\\LoggedOnUser")

->undef<-

--- End code ---




I need to retrieve this registry key ["LoggedOnUser"]

thanks for your help

--- End quote ---



Under ...
windows 7 x32 work fine
windows 7 x64 ->undef
Windows 10- >undef

Support:
I'm curious if you ran your test registry script as admin would you get the same results?

Script_test:

--- Quote from: support on November 15, 2016, 09:24:52 PM ---I'm curious if you ran your test registry script as admin would you get the same results?

--- End quote ---

Yup. The same result, i checked again.

Navigation

[0] Message Index

[#] Next page

Go to full version