I have the following vbs code, that opens a new SAP session.
Option Explicit
Dim WSHShell, SAPGUIPath, SID, InstanceNo, WinTitle, Name
Set WSHShell = WScript.CreateObject("WScript.Shell")
If IsObject(WSHShell) Then
SAPGUIPath = "C:\Program Files (x86)\SAP\FrontEnd\SAPgui\"
Name = """1. SAP ECC Production (PRD)"""
SID = "PRD"
InstanceNo = "00"
WSHShell.Exec SAPGUIPath & "sapgui.exe " & Name & " " & _
InstanceNo
WinTitle = "SAP"
While Not WSHShell.AppActivate(WinTitle)
WScript.Sleep 250
Wend
Set WSHShell = Nothing
End If
There are two scenarios when executing it:

What I want is to add a conditional to the code, that if the first case happens, does nothing, and if the second case occurs, selects the marked option,
Can anybody help me out please?