473,659 Members | 3,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Script 2 Create RDP sessions

1 New Member
Anyone ever used a script to create RDP session files?
You can edit an RDP file using any text editor, however if you try to use simple batch, or vbscript to append text to that file, it doesn't retain it normal properties.

Hopefully this example will make sense.
I have 300 servers.
I have a file with all their names/or/IPs in it.
I wanted to create a batch file or vbscript that would run through that list and create files named HOSTNAME.RDP.
That part was easy and they work on my lapotop/desktop HOWEVER:

My ultimate goal was to store these connection files on SharePoint so you can simply click on the host and connect via RDP.

When I uploaded the files I created with my batch file, SharePoint opens them and shows me the TEXT content, and doesn't let me open the file via RDP - EVEN though it has an RDP extension.

After banging my head against the wall for a while I noticed the following:
If I used these files on my system - no problem they will open in RDP like normal but the DON'T work from SharePoint!!

If I manually edit an RDP file that was saved through the RDP gui, no problem AND it works on SharePoint.

So there must be something in the file that NotePad/WordPad can't see that I am missing and that I can not re-create by writing to a "text" file in batch or VBScript.

I can use VBScript and the ADODB.Stream object to read the "GOOD" default RDP file, but then I can't figure out how to add the next line which would be the "HOST" part and would be unique over the 300 files.

Does that make sense to anyone? and can you help?
I have some code pieces that I have been trying but they don't write the host line correctly if you want to see what I was using.

Thanks!
niveknonrev
May 29 '07 #1
1 7999
Banfa
9,065 Recognized Expert Moderator Expert
Sorry about the lag in reply.

If you are still having problems then

1. It sounds to me as if RDP files are not entirely text and you are not creating them correctly. Try loading on into a hex editor (Google for one) and looking at the binary values stored in the file.

2. For a VBS question you best bet is to ask in the ASP forum
May 31 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
9180
by: Jean-Louis Vill | last post by:
Hi everybody, I have a personel server (I learning) with Linux I use apache, Php, Postfix. I want create with Php script a mail user by web form (yahoo like) I don't really know Php. May be someone can give me a example. I want permit at my friends to create their own email account. Thanks folks!
6
1870
by: Danny | last post by:
I am able to read the contents of our dynamic pages, but how can I create these html files on the fly on our server using asp. THe code below is a test to see if I can read the html and then save it to a file on our server in the same directory. It will not let me write to the file. I am trying to create static html pages from our dynamic asp script. I know it is an writes issue, but does anybody have any other ideas?
1
5208
by: Duncan | last post by:
I have a strange problem with sessions in PHP 5. I have a simple script that prints a random number both as a string and a picture on the screen. When I run the script for the first time, it works perfectly. However, when I refresh the page, new updated random number does not propagate to the image displayer script through sessions. The image displayer script continues showing the old number instead of the new random number. I checked the...
2
11174
by: runner7 | last post by:
Can anyone tell me if there is a way in PHP to determine when a session times out on the server or how many concurrent sessions there are in your application?
3
1334
by: chenna | last post by:
Hi guys, Please anybody answer my question "How to create sessions.".
41
3215
by: amygdala | last post by:
Hello all, I have posted a similar question in comp.lang.php in the past, but haven't had any response to it then. I kinda swept the problem under the rug since then. But I would really like to resolve this issue once and for all now. The problem might be PHP related but since I only develop applications using PHP, I'm not a hundred percent sure. Therefor I've taken the liberty to crosspost to comp.lang.php and alt.www.webmaster. I...
0
1143
by: kevin bailey | last post by:
Must be missing something obvious here but if I create sessions on a server I use $b = new Auth("MDB2"); $b->setSessionname("SESSION1"); This means I can have other sessions created by $b = new Auth("MDB2");
1
2459
by: ni3b007 | last post by:
I m having oracle 10g while creating database its giving me error database not mounted this is my p file; ########################################### # Cache and I/O ###########################################
1
1965
by: bn4 | last post by:
I have been trying to modify a script that i had working in the past but have lost.. ORIGINAL URL: http://www.thescripts.com/forum/thread147097.html STEPS: I want it to do the following: 1-Load a Random Image each time page loads or is refreshed / script starts (with corresponding url link when clicked) 2-Images change by blend/fade into one another, on an adjustable time delay 3-Next image loaded also loads new corresponding url/link
7
4199
by: Jaros³aw Kozik | last post by:
how to create script - update database development code using MSSQL 2000 Enterprise Manager i'm trying in this way all tasks -genetate sql script .... ( in this way I can generate only CREATE Database SCRIPT ... )
0
8337
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8748
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8628
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7359
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2754
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1978
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.