Re: Launch Remote Machine from my desktop (185 Views)
Reply
Regular Advisor
Umang_Agrawal
Posts: 83
Registered: ‎04-30-2008
Message 1 of 11 (296 Views)

Launch Remote Machine from my desktop

Hi All,

 

I have to launch Remote Machine from my desktop. i am using the below code which launches the server

 

(i have saved username and password in mstsc file)

set a = wscript.CreateObject("WScript.Shell")
a.Run "mstsc /v:server_name"

 

But just before the launch a warning message stating "you are accessing a system in company network, if you are authorized click on OK"

 

i tried below code to sendkeys space bar / enter, but it is not working.

a.sendkeys " "

 

on Manually clicking on OK remote machine gets launched. please help

Umang Agrawal
Please use plain text.
Occasional Contributor
bhandley
Posts: 6
Registered: ‎03-26-2013
Message 2 of 11 (281 Views)

Re: Launch Remote Machine from my desktop

Try:

 

a.sendkeys "~"

 

Which is Enter, specifically.

Please use plain text.
Regular Advisor
Umang_Agrawal
Posts: 83
Registered: ‎04-30-2008
Message 3 of 11 (273 Views)

Re: Launch Remote Machine from my desktop

Tht also didnt work, i tried it earlier
Umang Agrawal
Please use plain text.
Regular Advisor
Ryoganat1
Posts: 90
Registered: ‎10-04-2012
Message 4 of 11 (250 Views)

Re: Launch Remote Machine from my desktop

1. Did you try save it as with .RDP file and launch.

 

2.  Type mstsc /? in the command prompt and you will all the switch options. Try with /Public.

 

Thanks,

Ram

Please use plain text.
Regular Advisor
Umang_Agrawal
Posts: 83
Registered: ‎04-30-2008
Message 5 of 11 (247 Views)

Re: Launch Remote Machine from my desktop

This is also not working.

 

Actually by my method i am able to launch MSTSC, but before it launch remote machine, i am getting a warning message. Now i want to know how to click on OK to proceed further.


Ryoganat1 wrote:

1. Did you try save it as with .RDP file and launch.

 

2.  Type mstsc /? in the command prompt and you will all the switch options. Try with /Public.

 

Thanks,

Ram


 

Umang Agrawal
Please use plain text.
Regular Advisor
Ryoganat1
Posts: 90
Registered: ‎10-04-2012
Message 6 of 11 (237 Views)

Re: Launch Remote Machine from my desktop

 

Can to attach the snapshot of the message? So that we can narrow down the solution.

Please use plain text.
Advisor
Deepak111
Posts: 22
Registered: ‎02-15-2013
Message 7 of 11 (230 Views)

Re: Launch Remote Machine from my desktop

May be you can try programming the button control something similar like below:

 

Set Desc=Description.Create()
Desc("micclass").Value="vbButton"
Dim Button


Set Button=Window("ForeGround:=True").ChildObjects(Desc)

 

Button.click

 

The classname "vbButton" will change depending on the window it is appearing. Use Object Spy to check the class name.

 

 

Please use plain text.
Regular Advisor
Umang_Agrawal
Posts: 83
Registered: ‎04-30-2008
Message 8 of 11 (227 Views)

Re: Launch Remote Machine from my desktop

Thanks dude, i was looking for something in pure vbscript.

 

attached is the image of remote machine along with teh dialog in it.

Umang Agrawal
Please use plain text.
Advisor
Deepak111
Posts: 22
Registered: ‎02-15-2013
Message 9 of 11 (217 Views)

Re: Launch Remote Machine from my desktop

How to view the attachment ?

Please use plain text.
Super Advisor
csm2mk
Posts: 208
Registered: ‎02-08-2013
Message 10 of 11 (209 Views)

Re: Launch Remote Machine from my desktop

Try to connect as an admin.

 

It will only work if you are really an admin in the remote machine obviously.

 

mstsc /admin

Please use plain text.
Regular Advisor
HaiTNguyen
Posts: 102
Registered: ‎11-29-2011
Message 11 of 11 (185 Views)

Re: Launch Remote Machine from my desktop

AFAIK, you cannot do anything on RDP screen using QTP. You have to look for another option.

Does that machine have display output? Can you use VNC instead?
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation