Interviewer - Server Admin > UNICOM Intelligence Interviewer - Server Admin architecture > Security > What activities need to do > Desktop activities
 
Desktop activities
Depending on the goals of your desktop activity, you may want to allow only users with accounts in the trusted DPM NT user group (typically the group specified during installation) to log in, or you may want to present a dialog box that prompts users to enter their UNICOM Intelligence Interviewer - Server Admin user name and password. The following VB .NET code snippet illustrates how this can be done.
' Only members of the DPMAdminTrustees group will be able to log in this way.
' If this log-in succeeds, the user will have access to all projects,
' activities, and features.
If Not(Agent.LoginAsTrustedWindowsAccount()) Then
' Log-in failed. Try logging in as a non-trusted NT user.
If Not (Agent.LoginUsingWindowsAccount()) Then
' Log-in failed using the Windows account.
' Display a dialog box prompting for a user name and password
' and try logging in using this DPM user account.
Agent.Login(strUserName,strPassword,Nothing)
End If
End If

' Check that the user was logged in successfully
If Not(Agent.IsAuthenticated) Then
' The user cannot be logged in using any of these methods.
' Log-in fails.
End If
...
If (Agent.IsAuthenticated) Then
Agent.Logout
End If
See also
Adding activities to UNICOM Intelligence Interviewer - Server Admin
What activities need to do