ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
$login='***'
$user='MyEmail'
$password='MyPwd'
Add-Type -AssemblyName System.Windows.Forms
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class StartActivateProgramClass {[DllImport("user32.dll")][return: MarshalAs(UnmanagedType.Bool)] public static extern bool SetForegroundWindow(IntPtr hWnd);}
"@
$ie = New-Object -ComObject InternetExplorer.Application
Do {Start-Sleep 1} Until (!($IE.Busy))
$ie.Navigate('https://pages.caspio.com/login/bridgelogin/default.aspx?_ga=2.154520880.944330641.1518404630-2087572457.1512014159')
Do {Start-Sleep 5} Until (!($IE.Busy))
$ie.Visible=$true
[void] [StartActivateProgramClass]::SetForegroundWindow($ie.HWND)
($ie.Document.getElementsByTagName('a')|? {$_.classname -eq 'AdvancedUserLink'}).click()
([System.__ComObject].InvokeMember('getElementById',[System.Reflection.BindingFlags]::InvokeMethod,$null,$ie.document,'email')).value=$user
([System.__ComObject].InvokeMember('getElementById',[System.Reflection.BindingFlags]::InvokeMethod,$null,$ie.document,'Password')).value=$password
([System.__ComObject].InvokeMember('getElementById',[System.Reflection.BindingFlags]::InvokeMethod,$null,$ie.document,'Email')).focus()
[System.Windows.Forms.SendKeys]::SendWait(" {BS}")
([System.__ComObject].InvokeMember('getElementById',[System.Reflection.BindingFlags]::InvokeMethod,$null,$ie.document,'Password')).focus()
[System.Windows.Forms.SendKeys]::SendWait(" {BS}{Enter}")
exit
Got the attached.ASKER
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.
TRUSTED BY
Open in new window
of course, for real life I would save encrypted password into file and decode only for login (using powershell securestring, but it is for another question ;-)
Small small trouble can occure, if you (or some other application) change the focus during logon, but password is protected from displaying on such event.