Well, I slept on it, woke up and started Googling. Here's what I have:
By the way: sorry. I know this isn't specifically a Python issue; I just figured there are some experienced programmers here. Where else could I go for help?
handle = ctypes.windll.Kernel32.GetCurrentProcess() print(ctypes.windll.Advapi32.OpenProcessToken(handle, 'TOKEN_QUERY', token)) print(ctypes.windll.Kernel32.GetLastError())I needed the
GetCurrentProcess()
function to get the handle. But now I get an ErrorCode 5 - Acess Denied return. I'm an administrator account. The only account on this computer. I would really appreciate a Windows guru or two here. How can I access the token? I've read I can impersonate the LOCAL_SYSTEM account...By the way: sorry. I know this isn't specifically a Python issue; I just figured there are some experienced programmers here. Where else could I go for help?