/build/static/layout/Breadcrumb_cap_w.png

anyway to autologin?

Hi all,

ive been asked to have a .jnlp app auto login.
Ive created a scheduled task to auto run the .jnlp upon login and the application has a remember password checkbox, only thing left is to login.  I know AutoIT has the ability to script mouse clicks, but not sure if thats the best solution.  Imagining it can break of the resolution changes etc.

0 Comments   [ + ] Show comments

Answers (1)

Posted by: rileyz 7 years ago
Red Belt
0
You can script it with powershell, you need to be able to detect the windows form, ie the name of the windows - google and you find the info you need. Its still a bit hit and miss though.

This code will get you started.
$KeyPress_Sequence_A = "{Tab 5}{ENTER}"
$KeyPress_Sequence_B = "{Tab 1}{Right}{Tab 3}{ENTER}"
Add-Type -AssemblyName Microsoft.VisualBasic
Add-Type -AssemblyName System.Windows.Forms
 
Do {$ApplicationCheck = Get-Process | Where-Object {$_.MainWindowTitle -like "*Notepad*"} | Select-Object MainWindowTitle
Start-Sleep -Seconds 1}
While ($ApplicationCheck -eq $null)
 
$AppWindow = $ApplicationCheck.MainWindowTitle
[Microsoft.VisualBasic.Interaction]::AppActivate("$AppWindow")
[System.Windows.Forms.SendKeys]::SendWait("$KeyPress_Sequence_A")
[System.Windows.Forms.SendKeys]::SendWait("$KeyPress_Sequence_B")


 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ