Computing.Net > Forums > Networking > start a batch file on remote desktop

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

start a batch file on remote desktop

Reply to Message Icon

Name: Andy999
Date: September 30, 2009 at 14:23:33 Pacific
OS: Windows XP Pro SP3
Product: Microsoft / Remote desktop
Subcategory: Servers
Comment:

I have been searching for ages, but I guess I just don't have the understanding of how networks hang together sufficiently yet.
This is for work and they have decided to not allow scheduler to run on a Remote Desktop which I use. I run a batch file weekly on it to produce various data extracts (in Cognos, but that's another story). So Monday mornings I log into the Remote Desktop and then run a batch file which does all the data extracts.
BUT, I want it to run BEFORE I get into the office.
I have worked out how to open the Remote Desktop with mstsc and an RDP file, complete with password, so I can get to the point where a message box appears on the Remote Desktop reminding me of all the nasty things which will happen to me if I am a naughty boy and this requires that I click OK.
How do I make my batch file click OK in the remote desktop and how do I tell the remote desktop to run the batch file?



Sponsored Link
Ads by Google

Response Number 1
Name: wanderer
Date: September 30, 2009 at 14:53:32 Pacific
Reply:

You would run the batch file the same way you would if you were sitting at that pc.

If you can't do so I would suspect you don't have permissions. You would need to talk to the powers that be so you can have the permissions.

Did they give you a reason why they would not let you schedule the batch? That seems very strange.


0

Response Number 2
Name: Andy999
Date: October 1, 2009 at 08:55:46 Pacific
Reply:

Hi, thanks but I don't think you quite got what I am saying. If I was sitting at that pc I would double click the batch file.
But I can't do that because I am not in the office when I want it to run. No issue with permissions, I run the batch file manually every week, and can run any reports whenever I like, but no-one is allowed to run the scheduler. The scheduler is disabled.
So how do I start the batch file on the remote pc, but using the scheduler on the local pc?
But don't worry about the schedule bit, how do I make the batch file on the remote pc start from a batch file running on the local pc without user involvement?
I can create rdp file if necessary, but I am not sure if that is part of the answer. I suspect it is not.


0

Response Number 3
Name: wanderer
Date: October 1, 2009 at 11:40:14 Pacific
Reply:

"but using the scheduler on the local pc?"
No can do.

Closest you can get is to schedule a script on your local pc that automatically starts a rdp session, authenicates, logs on to the distination pc and then manually launches the batch file on that pc.

How you would automate RDP without programming.. I have no idea. Since you would have to provide account/passwords in the script I would see that as a security breach.


0

Response Number 4
Name: ace_omega
Date: October 1, 2009 at 12:10:49 Pacific
Reply:

Yuck this can be a hard one. What you could do is make a Macro Recording of your keyboard and mouse of you clicking the message. Then setup MS-Scheduler to run the Macro at that machine. You could do the same on your computer through an RDP but the problem is that you can't be sure that the window will open in the exact same place at the same resolution so the mouse click would just click off screen so it would be better to run the macro recording on the remote computer with scheduler.

http://www.autohotkey.com/

P.S. are you trying to get around getting to work on time and to login remotely?
If you were trying to do this where I work it would fail because 1) you can not RDP unless you are an administrator and 2) you can not use scheduler.


0

Response Number 5
Name: Andy999
Date: October 1, 2009 at 12:38:23 Pacific
Reply:

Thanks very much for the answers so far.
I am not trying to login remotely, just want to start the job running before I get there, which will mean I can get on with other things earlier as well.

Wanderer, if I read it right, your second paragraph sounds exactly like what I want to do if 'the script' can launch the remote batch file. How can it be done?

Ace_omega, AutoHotKey looks interesting, I will give that a try and feedback.


0

Related Posts

See More



Response Number 6
Name: ace_omega
Date: October 1, 2009 at 12:43:39 Pacific
Reply:

Just set it up in Microsoft Task Scheduler. Have you ever use it before?

http://www.iopus.com/guides/winsche...


0

Response Number 7
Name: Andy999
Date: October 1, 2009 at 14:04:40 Pacific
Reply:

Hi ace_omega, yes that is what I already use regularly to run things on local PC. I guess you are suggesting that after I set up the Autohotkey script I run it with the scheduler, yes?
Thanks


0

Sponsored Link
Ads by Google
Reply to Message Icon





Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: start a batch file on remote desktop

batch file on ipconfig www.computing.net/answers/networking/batch-file-on-ipconfig/33651.html

DX Error on Remote Desktop www.computing.net/answers/networking/dx-error-on-remote-desktop/29767.html

Create a Batch Files to access Link www.computing.net/answers/networking/create-a-batch-files-to-access-link/15766.html