![]() I'm very much a newb with the WMI stuff and objects, but it looks like the. Get ( "Win32_UserAccount.Name='" & $un & "',Domain='" & $dom & "'" ) $objAccount = $objWMIService ^ ERROR On my new PC any of those commented out lines of code cause an error, and the script won't even compile. for each of those line currently commented out. Description EndIf ConsoleWrite ( $FullName & ) ConsoleWrite ( $Description & ) Return EndFunc Get ( "Win32_UserAccount.Name='" & $un & "',Domain='" & $dom & "'" ) If IsObj ( $objAccount ) Then $FullName = $objAccount. Test ( 'username', 'DOMAIN' ) THIS ERRORS: Test('localun', 'DOMAIN') THIS ERRORS: Test(' ', ' ') THIS ERRORS: Test('', '') THIS ERRORS: Test('localun', '') THIS ERRORS: Test('', 'DOMAIN') Func Test ( $un, $dom ) $compName = 'PCNAME' $FullName = '.' $Description = '.' get the WIM object $objWMIService = ObjGet ( "winmgmts:\\" & $compName & "\root\cimv2" ) get default user full name and description $objAccount = $objWMIService. ![]() ![]() I couldn't find anything mentioned in the change logs though, so perhaps I'm wrong.Īnyway, the code to replicate my issue is: I have a bit of code that works on my old Win10 PC, that fails on my new Win10 PC, and I think the only significant difference is the version of Autoit - old PC has 3.3.12, new has 3.3.14.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |