WMI Impersonation problem
-
Hi, i want to get number of printers attached to my computer, i use Win32_printer class to get the printers, but before connecting WMI i impersonating to some other user. But the WMI gives the output not for the impersonated user but the one who has launched it. I am launching the process in system accout and trying to impersonate to the logged in user to get the printer information of the logged in user. (Initially i have to launch the process in system account) Does anybody has any idea how to do this??
-
Hi, i want to get number of printers attached to my computer, i use Win32_printer class to get the printers, but before connecting WMI i impersonating to some other user. But the WMI gives the output not for the impersonated user but the one who has launched it. I am launching the process in system accout and trying to impersonate to the logged in user to get the printer information of the logged in user. (Initially i have to launch the process in system account) Does anybody has any idea how to do this??
Check why the Impersonate to other user is not successful.