Sapien wmi explorer7/14/2023 So, the issue appears to be unrelated to "bit"-ness and has everything to do with WMI data access requiring administrator privileges even though I am running locally using a login that does, in fact, have administrator privileges. I then ran the Code Plex WMI Explorer as administrator and it was also able to iterate over Win32_PowerPlan without errors. Both the 32-bit and 64-bit versions of that software can query Win32_PowerPlan and display results. I downloaded a WMI process explorer from Sapien, and it displays a UAC prompt every time it starts, running it with elevated privileges. This makes me think this isn't just some sort of Foxpro issue. (That is the literal response - no actual error is listed.) The log returns an error:įailed to enumerate instances from Win32_PowerPlan. I downloaded a "WMI Explorer" tool from Code Plex, and I actually get the same problem there when I try to iterate over Win32_PowerPlan. So, it looks like I am being locked out from power plan information because the process thinks I am remotely trying to change the configuration even though I am accessing WMI data from the local machine (where I do have administrator rights, incidentally). If you want to install or configure software on the server, Remove, or configure server software during a Terminal services remote ![]() OLE error code 0x80070668: Only administrators have permission to add, ![]() If I wrap the iterating FOR loop in a TRY.CATCH, the error I get is: The object exists and has visible properties, but if I try to access anything in the debugger, it says the expression cannot be evaluated. The error happens after loItems is instantiated via the ExecQuery() method call. The code has been working for years, from Windows XP up through (I think, anyway), Windows 10. LoItems = loWMIService.ExecQuery("SELECT * FROM Win32_PowerPlan") LoWMIService = GETOBJECT("winmgmts:\\.\root\cimv2\power") I realize Visual Foxpro code is like a fossil, but it is still pretty easy to read: loSchemes = CREATEOBJECT("Collection") On my Windows 10 64-bit machine, however, I am getting errors when I try to enumerate a collection of power plans. I am trying to enumerate Windows power plans through very straightforward code that has been working for several years.
0 Comments
Leave a Reply. |