Micro Focus QTP (UFT) Forums
Automate Remote connection Manager actions - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Automate Remote connection Manager actions (/Thread-Automate-Remote-connection-Manager-actions)



Automate Remote connection Manager actions - iltgmds - 06-26-2012

Hi,

I'm new to qtp and this question might sound silly but I would like to give it a try....I would like to know if it is possible to automate the actions that can be performed on Remote connection manager(RCman).For instance I would like to connect to a remote machine through RCMan.

Please pour in your thoughts.


Thanks in advance.

Regards,
iltgmds


RE: Automate Remote connection Manager actions - supputuri - 06-26-2012

Yes we can using different option.

1) Command prompt
2) RCman object

Please let me know if you need any more information.



RE: Automate Remote connection Manager actions - iltgmds - 06-27-2012

Hi supputuri,

Thank you so much for responding.Could you please elaborate on how to achieve this for at least one action.Or if you could guide me with the RCman object model, that helps me.

Regards,
iltgmds


RE: Automate Remote connection Manager actions - iltgmds - 06-27-2012

Hi Supputuri,

Can you please guide me with rcman object or command promp please?

Regards,
iltgdms


RE: Automate Remote connection Manager actions - iltgmds - 06-27-2012

Hi Supputuri,

Can you please guide me with rcman object or command promp please?

Regards,
iltgdms


RE: Automate Remote connection Manager actions - supputuri - 06-28-2012

Hi Sorry for the late replay.

Command Prompt:
Code:
strRemoteBox = InputBox ("Enter your remotebox name or IP")

Dim Owshel
Set Owshell = CreateObject("WScript.Shell")
Owshell.Run "mstsc /v:" & strRemoteBox
Set Owshell = Nothing

We can run the command line without using Shell object, but we have to use the DP for the same.

Code:
strRemoteBox = InputBox ("Enter your remotebox name or IP")
'Close all open command windows (this step will execute without error even no command windows exist)
SystemUtil.CloseProcessByName ("cmd.exe")
'Open the command window using systemUtil
SystemUtil.Run "cmd"
'Now you can enter the command line
Window("regexpwndclass:=ConsoleWindowClass").Type "mstsc /v:" & strRemoteBox

please let me know if you need any further info.