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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with RDP Script!

Status
Not open for further replies.

Alexial

Programmer
Nov 26, 2008
36
US
I have a script that is really pretty simple that launches RDP and then logs the user in (if the credentials are saved). The issue I'm having is that it's been working perfect on my Vista machine, but refuses to work on the Windows XP Embedded machine I need it to work on :)

Here's the code:
Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "C:\Windows\System32\mstsc.exe /v:Xsets02 /f"

Like I said, very simple. When I launch it on the XP Embedded machine it gives me a weird error:

"There is no file extension in "C:\Documents"."

Now, there is nothing in there that points to that folder, so I began thinking maybe something was missing from the windows install such as the powershell or WMI. I looked and WMI is installed but I can't install the powershell because every time I download the .net framework 2.0 redistributable it tells me it is not a valid Windows 32 application.

I also looked to see if maybe it was looking for the default.rdp profile that is created when it's first launched- it's in every User\Documents folder, and I even created a folder called C:\Documents and put it in there to no avail.

Can anyone help me out? Will getting the powershell installed fix my issue?

Thank you!!
 
PowerShell will have nothing to do with this. Have you tried updating the MSTSC on the XP machine to version 6.0?

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.
 
Well, I guess it's good to know powershell has nothing to do with it because I can't get it to install xD

But yes, it actually had version 6.0 and I updated it to 6.1 to see if that would help- still no go.
 
is this embedded machine going to be making a connection visible by the public, such as some type of kiosk?

- Brandon Wilson
MCSE:Security00/03; MCSA:Security03
MCSA:Messaging00; MCP; A+
IT Pangaea (
 
Yes- Basically what it is going to be used for is so that our techs can use it as a terminal during their presentations about how to install printer drivers, print things, use HP and Sharp scanning software, etc, and then the customers can test it out themselves.

RDP works perfectly from the machine if I launch it using mstsc.exe (with saved credentials and all!) I just want to write a script that I can put into the 'Logon Script' section of the user profile in the AD so when the machine powers up and is logged in it will start the remote connection automatically.

Thanks for the assistance so far ^^
 
So why not save the connection and put it in the All Users Startup folder?

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.
 
As in just place the default.RDP file in the users start up folder?

Well.. I guess I just didn't think that would work lol

I think I may have tried that once, and I don't think it worked because the computer was trying to acquire an IP address while the RDP started up (so it didn't connect). I wanted to make it a script so that I could put a sleep action on it.

Is there a way to do this on windows embedded or is tossing it into that folder my best bet?
 
Update: I figured out why the script wasn't working! I used a registry edit to re-associate some DLLs that the VBscript needed to work.

Now I just need it to save the remote desktop credentials!
 
Glad you got it working.

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