I am unable to impersonate the user to Administrator on Vista machine, I see that the credentails are being correctly passed to my executable.
I see that the AdjustTokenPrivileges fails with ERROR code 1300, the below is the error stach after AdjustTokenPrivileges fails is called
AdjustTokenPrivileges failed for SE_TCB_NAME
RunAs ERROR: error code = 514, message = Not all privileges or groups referenced are assigned to the caller.
RunAs ERROR: error code = 514, message = Not all privileges or groups referenced are assigned to the caller.
LoadUserProfile failed
ERROR: error code = 522, message = A required privilege is not held by the client.
RunAs ERROR: error code = 522, message = A required privilege is not held by the client.
CreateEnvironmentBlock failed
Please let me know if there are known issues with AdjustTokenPrevilages on Vista, the same code works on Windows 7 and XP
I see that the AdjustTokenPrivileges fails with ERROR code 1300, the below is the error stach after AdjustTokenPrivileges fails is called
AdjustTokenPrivileges failed for SE_TCB_NAME
RunAs ERROR: error code = 514, message = Not all privileges or groups referenced are assigned to the caller.
RunAs ERROR: error code = 514, message = Not all privileges or groups referenced are assigned to the caller.
LoadUserProfile failed
ERROR: error code = 522, message = A required privilege is not held by the client.
RunAs ERROR: error code = 522, message = A required privilege is not held by the client.
CreateEnvironmentBlock failed
Please let me know if there are known issues with AdjustTokenPrevilages on Vista, the same code works on Windows 7 and XP