getDomainOSUser slow execution & crash
Posted: Thu May 20, 2021 7:23 pm
OA V3.16 patch 23.
I have a panel push button script that has the following line.
int i = getDomainOSUser(username, fullname, description, groups, domain, password);
The parameter strings are defined in the script and are uninitialized.
This function call does return the username of the logged in user as expected. However, it takes 3 minutes or so to complete.
I also get the following error in the log file:
Module: mainModule_1
Panel: C:\HMI\Project_Name\panels\vision\Utilities\Maintenance.xml [System1 Maintenance]
Object: 252 named: "HMIShutdown" of type: PUSH_BUTTON
Script: Clicked
Library: C:\Siemens\Automation\WinCC_OA\3.16\scripts\libs\std.ctl
Line: 1760, The specified domain either does not exist or could not be contacted. (0x0000054b=1355), Administrator
I have looked at the standard script (std.ctl) and that line is:
dyn_mapping mGroups = getOSUserGroups(username,domain); // TFS 10267
The help on the getOSUserGroups function suggests that there is only one argument expected (username):
dyn_mapping getOSUserGroups(string userName);
However the std.ctl script calls the function passing in 2 arguments.
Is that what is causing the error?
Is it that which is causing the getDomainOSUser to take ages to complete?
Is there a better / faster way of getting the logged in user from the OS?
I have a panel push button script that has the following line.
int i = getDomainOSUser(username, fullname, description, groups, domain, password);
The parameter strings are defined in the script and are uninitialized.
This function call does return the username of the logged in user as expected. However, it takes 3 minutes or so to complete.
I also get the following error in the log file:
Module: mainModule_1
Panel: C:\HMI\Project_Name\panels\vision\Utilities\Maintenance.xml [System1 Maintenance]
Object: 252 named: "HMIShutdown" of type: PUSH_BUTTON
Script: Clicked
Library: C:\Siemens\Automation\WinCC_OA\3.16\scripts\libs\std.ctl
Line: 1760, The specified domain either does not exist or could not be contacted. (0x0000054b=1355), Administrator
I have looked at the standard script (std.ctl) and that line is:
dyn_mapping mGroups = getOSUserGroups(username,domain); // TFS 10267
The help on the getOSUserGroups function suggests that there is only one argument expected (username):
dyn_mapping getOSUserGroups(string userName);
However the std.ctl script calls the function passing in 2 arguments.
Is that what is causing the error?
Is it that which is causing the getDomainOSUser to take ages to complete?
Is there a better / faster way of getting the logged in user from the OS?