Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I make a VBscript work with a remote server connection.

Status
Not open for further replies.

scott257us

Technical User
Nov 14, 2006
3
US
Here is what I have and I am haveing no luck with it.

Option Explicit
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "jde"

"jde" is a shortcut which connects to another server and runs a log-in screen I cannot access the window without clicking on each entry myself, can it be done with a script? If so I need help.

Wscript.Sleep 5000
objShell.SendKeys "password"
objshell.sendkeys "{TAB}"
objshell.sendkeys "{TAB}"
objshell.sendkeys "{ENTER}"
WScript.Quit

The above is the keystrokes I need to send but doesn't recognize the objshell, I tried AppActivation commands and still get nothing.
 
It looks fine, is jde in the same location as the script?

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
yes jde is a shortcut, but it opens up a program thru citrix which is similiar to a remote connection but is seemless so it looks like it is on my desktop but isn't.
 
You need to use WSHRemote but first you have to set up the DCOM configuration on the remote machine.
 
Just hit a major problem with WshRemote. It creates a temporary file called wshx.tmp where x is a hex number from 1 to FFFF. This file never gets deleted unless you clear out your temp directory. If it hits FFFF wshremote stops running.
 
So why not script the deletion of the temp files?

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top