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

Keeping windows maximized

Status
Not open for further replies.

skifiend

IS-IT--Management
Dec 5, 2001
18
US
I have a simple script that I can't take much credit for. dm4ever wrote it. I'll give you the jist of what it does. I have it running on a thin client and it automatically opens a terminal server session. If that session is closed, it reopens it back up again. Basically I'm trying to keep this thin client as a sort of kiosk that goes to one website. What I'm finding is that users are just minimizing the current session and opening another one. What I want to do is modify the script so that it keeps the terminal server session window open at all times. If a user tries to minimize the window, it simply maximizes it immediately. Here's the current script:

Option Explicit
'On Error Resume Next
Dim objShell
Set objShell = CreateObject("WScript.Shell")
Do
If (objShell.AppActivate("Remote Desktop") = False) Then
objShell.Run "mstsc.exe c:\remotedesktopconnections\default.rdp"
WScript.Sleep 5000
Else
WScript.Sleep 3000
End If
Loop

Thanks for any advice you can give!
 
It is too bad WMI didn't seem to work with your XP Embedded. You could have prevented anyone launching a separate RDP session if it did not match the PID of the one you call via the script.

In terms of maximizing the window, I think you'll have to use AutoIT ( which will let you launch, set focus, and maximize your window. You can compile the script into an exe wrapper so you can run it on a machine that does not have AutoIT installed.

You could also do something similar if you have MS Word 2003 installed on that XP embedded box.

I'll post if I find any other method that may work.

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
This may get you closer to doing what you want.

1. Launch mstsc
2. Open your profile (.rdp file)
3. Select the "Display" Tab
4. UnCheck "Display the connection bar when in full screen mode"
5. Ensure your profile will run in "Full Screen" mode
6. Save it

At least when I tried this, it removed the ability to minimize the window or close it out from the bar at the top.

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Unchecking that "Display the Connection bar..." does work on my laptop. But when I try it on the thin client, the setting doesn't seem to take any effect. It is clearly unchecked, yet it maintains that Connection Bar at the top.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top