Question : Script for Failover RDp

We have many satellite offices who use RDP terminal sessions to do their day to day work, while working on the servers in our Colo.
I just had a second ISP line installed in the colo. And was wondering how difficult would it be for failover to write a script that would start the rdp session to the first ip address and if it fails launch another saved rdp session to the second colo wan ip address.
Could someone point me in the right direction to get started.

Answer : Script for Failover RDp

Sorry, bad code. Try this new one, I tested it. Also, replace IP1 with the first IP, and IP2 with the failover wan ip.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
IP1="10.1.6.100"
IP2="200.49.32.127"

RunLocalCMD("mstsc -v:" & IP1)


status = InputBox("Was the session connected? (Y/N)")

if (UCASE(status) = "N") then
RunLocalCMD("mstsc -v:" & IP2)


end if


Function RunLocalCMD(argument)
	cmd = "%comspec% /k " & argument
	Set obj2Shell = CreateObject("WScript.Shell")
	obj2Shell.Run cmd
	Set obj2Shell = Nothing
End Function
Random Solutions  
 
programming4us programming4us