NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic login in TestStand

I am writing a TestStand UI in VisualBasic and wish to log users in and out of TestStand.
However, I do not wish to launch the TestStand LoginLogout callback pop-up dialog (frontend.dll). Instead I wish to log users in automatically (in the background) based on parameters from an entirely separate login application.
Effectively, simulating the functions of the frontend.dll for login and logout purposes.

I can (I assume!) set "StationGlobals > TS > CurrentUser > LoginName / Password / FullName / Privileges" variables from VB and so effectively login that way.
Are there any other variables/parameters to be set (that the frontend.dll sets), doing it this way?

Is this an acceptable way of Logging on programmatically or is there another, bette
r way of logging on automatically without the pop-up dialog?

Help would be appreciated.

Thanks
Dan
0 Kudos
Message 1 of 9
(6,778 Views)
Would logining in as the Windows System User be OK? If that's the case, you can just set this option in the Station Options >> User Manager Tab. When you run your UI, it will execute the login sequence and will check the windows system user against the list of users and if they are on that list, automatically log them in.

Alternatively, you may be able to change/edit the Frontend.dll login.c source file DoGetNewUser function to handle your specific login needs.

Hope that helps.

-Jack
0 Kudos
Message 2 of 9
(6,778 Views)
Jack,

Thanks - I have used the logon as Windows system user before.

What I need to do here is to pass a user name and password to the callback (or directly set any parameters I need to from VB) so that I login to TestStand in the background without the pop-up dialog.
Effectively the same way the "Login as Windows user" works but with my own dialog instead.

I hope that makes sense.
Thanks
Dan
0 Kudos
Message 3 of 9
(6,778 Views)
Hello Dan,

Setting the global variable is not the correct way to do this. Could you please refer to the following developer zone document on how to login a user programmatically. If this does not work please let me know.

http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/b18cf091f0209c028625690400726a9e?OpenDocument

Thanks.
0 Kudos
Message 4 of 9
(6,778 Views)
Thats the info I needed.

Thanks,
Dan
0 Kudos
Message 5 of 9
(6,778 Views)
Can u pls provide an existing link
0 Kudos
Message 6 of 9
(6,024 Views)

Sgy1,

 

This link might help you - Programatically Change User During Execution

 

-Jack

 

0 Kudos
Message 7 of 9
(6,014 Views)

Is there a a new link for the solution? since the previous one gives me Page Error.

 

Thank you!

 

Best Regards,

Zuc

0 Kudos
Message 8 of 9
(651 Views)