getDomainOSUser slow execution & crash

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
4 posts • Page 1 of 1
Smiffy
Posts: 45
Joined: Thu May 18, 2017 4:21 pm

getDomainOSUser slow execution & crash

Post by Smiffy »

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?

User avatar
kilianvp
Posts: 443
Joined: Fri Jan 16, 2015 10:29 am

Re: getDomainOSUser slow execution & crash

Post by kilianvp »

use getOSUser()

Victor.Ermakov
Posts: 25
Joined: Fri Oct 20, 2017 8:50 am

Re: getDomainOSUser slow execution & crash

Post by Victor.Ermakov »

kilianvp wrote: Fri May 21, 2021 9:42 am use getOSUser()
WCCOAui freezes for a few seconds when executing getOSUser()

gschijndel
Posts: 373
Joined: Tue Jan 15, 2019 3:12 pm

Re: getDomainOSUser slow execution & crash

Post by gschijndel »

You could also try the function 'getDomainOSUserLocal'.

Post Reply
4 posts • Page 1 of 1