assuming you are trying to log into bloomberg automatically using some script. i use vbscript to achieve this at a scheduled time of the day.
below is my vb script saved as a .vbs file and executed using windows task manager
you will need to change loginname and password to match yours
the commented part of the loop waits for the Bloomberg chat window to appear. this was then commented as i made some settings on bloomberg to not to open chat window upon logon. - i do not remember what was exactly done then
This will work only if you have a bloomberg open terminal which does not ask for an otp after login as it generally asks on a Bloomberg Anywhere terminal
also before running this script ensure that bloomberg application is closed / not open
you may use taskkill command to close all the instances of wintrv.exe
taskkill /IM wintrv.exe /F
Below is the vbs script.
set WshShell = WScript.CreateObject("WScript.Shell")
dim ret
ret = False
do while ret=False
ret = WshShell.AppActivate("BLOOMBERG: Login")
WScript.Sleep 10000
If ret = True Then
'CreateObject("WScript.Shell").PopUp "here", 5
'WshShell.AppActivate("BLOOMBERG: Login")
WScript.Sleep 3000
WshShell.SendKeys "{esc}"
WScript.Sleep 1000
WshShell.SendKeys "login~"
WScript.Sleep 10000
WshShell.SendKeys "loginname{tab}password~"
wScript.Sleep 20000
else
Call WshShell.Run("C:\blp\Wintrv\wintrv.exe")
WScript.Sleep 15000
End If
loop
'WScript.Sleep 5000
'ret=False
'do while ret=False
'ret = WshShell.AppActivate("IB - IB Manager")
'if ret=False Then
' WScript.Sleep 3000
'End If
'loop
WScript.Sleep 5000
WshShell.AppActivate("New Tab")