I have a printer named "Teacher's Lounge Printer" (note the apostrophe). When executing the following command at a standard Windows 7 Command Prompt, "Error 0x8004103A Invalid object path" occurs. cscript "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "Teacher's Lounge Printer" If I rename the printer to "Teachers Lounge Printer" (without the apostrophe), the command [...] read more
When I have tried to get the username using below code, I have successfully get the user name: hres = pSvc->GetObject(L"Win32_SID.SID='S-1-5-82-1036420768-1044797643-1061213386-2937092688-4282445334'", 0, NULL, &pclsObj, NULL); But when assign the SID into variable as follows std::string SID = "S-1-5-82-1036420768-1044797643-1061213386-2937092688-4282445334"; hres = pSvc->GetObject(L"Win32_SID.SID=SID", 0, NULL, &pclsObj, NULL); then I got the following [...] read more