RE: terminal sessions takes more then a minute to logoff

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Here is the vb script I created today to work around this problem.

I changed the line in my webpage to execute this script on the remote server
instead of calling iexplore.exe directly. The key to this working is the
"logoff" command at the end.

A problem I ran into was passing the pathname to the run command, it has
spaces in it which wouldn't work. I got around this by using the shortpath
instead of the long path of the executable program.

Hope this helps,
Patrick Gilman
Enterprise Systems Engineer
Lahey Clinic
patrick (-at-) nhmail.us

ie.vbs
-----------------------------
'This scripts verifies the existance of a program, gets the shortpath, and
then runs it.

'Replace with the path to your application
cProgram = "c:\program files\Internet Explorer\iexplore.exe"
'These are the command line arguments
cArgs = "http://www.microsoft.com/";

DIM objShell, fso, f, sPath, cLine, cProgram

set objShell = WScript.CreateObject("WScript.Shell")
Set fso = WScript.CreateObject("Scripting.FileSystemObject")

'Check to see if the program exists where specified
If (fso.FileExists(cProgram)) Then
Set f = fso.GetFile(cProgram)
sPath = f.Shortpath
cLine = f.Shortpath & " " & cArgs
wscript.echo "This is the command which will run: " &cLine
objShell.Run(cLine), 3, True
Else
wscript.echo "Program not found: " & cProgram
End If
objShell.Run("logoff")
------------------------------------------------------------


"Sigitas Skublickas" wrote:

> Hello,
>
>
>
> I have Terminal server 2003 that executes certain application at a login
> time. When I close that app, it takes
>
> more then a minute for Terminal server to logoff from terminal session
> (Blue/blank screen stays for a while active).
>
> Does anybody have any thoughts on that?
>
> Thanks!
>
>
>
> Sigitas Skublickas
>
>
>
.



Relevant Pages

  • CGIscript.net - csMailto.cgi - Remote Command Execution
    ... CGIscript.net - csMailto.cgi - Remote Command ... csMailto is a perl cgi formmail script developed by ... execute command on server and mail output to anyone ...
    (Bugtraq)
  • Re: shell scripting
    ... and am assuming an sh-compatible shell here.... ... command 1 options arguments ... To run the script, do: ... then you need to use the full path to execute it: ...
    (comp.unix.questions)
  • Re: shell scripting
    ... and am assuming an sh-compatible shell here.... ... command 1 options arguments ... To run the script, do: ... then you need to use the full path to execute it: ...
    (comp.unix.shell)
  • =?iso-8859-1?Q?Re:_Jcl?=
    ... I can send you a program that you execute as a step in your job and it ... I have a command and job scheduler that is available in a free version ... demand script processor with the full scripting ability so that your job ...
    (bit.listserv.ibm-main)
  • Re: sms installer- automate installing local printer
    ... Thanks Terry- Here is the script that I used that seemed to work- I just had ... > However since you are asking about getting the command line to work we can ... execute program this is where you are making the most mistakes. ...
    (microsoft.public.sms.installer)