Sign in to follow this  
Followers 0
Loller5

[RDP] Check Availability To Connect

3 posts in this topic

Hey all.

Having problem. I need script which.

1. Check for external ip (or ip with forwarded port)

2. Check the connection to localhost machine without connecting to it. (Or connect only for check without entering login/pass.)

2. If connection successful - do smth

3. If connection unsuccessful - continue script

Can anyone help, please? :)

Share this post


Link to post
Share on other sites



Hi Loller5,

$socket = TCPConnect( "10.10.10.1", 3389 )

If $socket = -1 Then
        ; an error has occured
        ConsoleWrite(@error & @CRLF)
    Exit 1
Else
        ; RDP seems running
    Exit 0
EndIf

Regards,

Hannes

:)


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0