Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 23rd, 2007, 01:47 PM
ardenen ardenen is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 1 ardenen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 40 sec
Reputation Power: 0
Other Language - WSH / VB script for remote terminals and generic user

Here's the scenario:

I'm implementing a bunch of Panasonic CF-08s which are basically dumb terminals with wireless. They connect via MS RDP to a Server 2K3 Terminal Server.

I'm trying to auto-launch a Java based client for our EMR (electronic medical records) and create a unique shortcut on the desktop. Each Java client needs a unique connection to access and there are going to be 50+ clients split between two terminal servers.

The users log in with a generic log-on.

Basically I thought of two ways to implement this -- either I could have a pool of client "sessions" (the unique info the Java client needs) on the server that the server would hand out when a device connects then mark that session as used and hand out the next device. Or I could assign sessions based on the device name of the connecting client. As the primary users of these devices do not usually log out of the terminal connection I felt it would be extremely difficult to implement a working round-Robbin system and decided to focus on assigning session info based on the connecting device ID.

I've created a couple of VBscript/WSH (I don't know that there is a difference other than WSH can run JS?) that make the process a little easier for me but the area I'm having issue with is this script:

Dim AShell ' The Shell
Dim AFSO ' The File System Object
Dim AShortcut ' The Shortcut

Set AShell = WScript.CreateObject("WScript.Shell") ' Create the Shell
Set AFSO = Wscript.CreateObject("Scripting.FileSystemObject") ' Create the FSO

system = AShell.ExpandEnvironmentStrings("%CLIENTNAME%") ' Grab the Client Name from Terminal Services

strDesktop = AShell.SpecialFolders("Desktop")
AFSO.DeleteFile(strDesktop & "\W2*.lnk"), DeleteReadOnly
Set AShortcut = AShell.CreateShortcut(strDesktop & "\" & system & ".lnk")
AShortcut.IconLocation = "C:\Program Files\IDX\LCJ\LCJ3.ico"
AShortcut.TargetPath = "C:\batch\" & system & ".vbs"
AShortcut.Save

AShell.Run "C:\batch\" & system & ".vbs"

Now maybe it's my ignorance of how a 2003 Terminal Server runs but I thought for sure even though the clients were loggin in with the same user info each would have its own temporary desktop space (in the TS configuration it is set to Use temporary folders per session) . Unfortunately when I log in with one device it sometimes deletes the existing icon and creates the appropriate icon pointed to the VBscript that is then pointed to the XML file containing the session info. The next client to log on sees the icon of the first client and creates a new icon for its session info but the first client has its shortcut replaced with the second clients.

Okay - so if you're with me so far I'm amazed - what I'm asking for is either a new direction to attempt or some help with the WSH/VBscript so that when the same user account logs in multiple times on different devices it will create a unique shortcut that only that device can see.

I thought the trouble might be with my code strDesktop = AShell.SpecialFolders("Desktop") -- should I be pointing the shortcut somewhere else that is temporary?

Thanks in advance for suggestions or help.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Other Language - WSH / VB script for remote terminals and generic user


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway