From: mariorivera1974 on 18 Nov 2006 20:32 Hi all, I have remote 2 user sessions on win 2003 box which i wish to have running at all times. The sessions sometimes misbehave causing win2003 to reboot. I would like to automatically recreate a client remote session when a server restarts. It is going to be the same two users every time. I was thinking of having a client session initiated with a bootup script, and then disconnected (not terminated). What components could I use for this, I've tried MsTscAx.MsTscAx.4 . I have attached a simple snippet of what I was thinking of executing. This doesn't even work from a second host, in a normal user session, hence my doubts about the suitability of the component I'm using. Thanks in advance mr '''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''' Sub ExecuteConnection(strServer, strUser, strPW) ' create the client Dim objMsRdpClient Set objMsRdpClient = CreateObject("MsTscAx.MsTscAx.4") objMsRdpClient.Server = strServer objMsRdpClient.UserName =strUser objMsRdpClient.FullScreen = false objMsRdpClient.AdvancedSettings2.RedirectDrives = False objMsRdpClient.AdvancedSettings2.RedirectPrinters = False objMsRdpClient.AdvancedSettings2.RedirectPorts = False objMsRdpClient.AdvancedSettings2.RedirectSmartCards = False objMsRdpClient.AdvancedSettings2.ClearTextPassword = strPW objMsRdpClient.StartConnected = True WScript.echo "Before connecting" dim intResult ' The following call returns immediately intResult = objMsRdpClient.Connect WScript.echo "After connecting Result: " & intResult WScript.sleep 10000 objMsRdpClient.Disconnect End Sub
From: mariorivera1974 on 20 Nov 2006 15:49 mariorivera1974(a)yahoo.co.uk wrote: > Hi all, > > I have remote 2 user sessions on win 2003 box which i wish to have > running at all times. The sessions sometimes misbehave causing win2003 > to reboot. > > I would like to automatically recreate a client remote session when a > server restarts. It is going to be the same two users every time. > > I was thinking of having a client session initiated with a bootup > script, and then disconnected (not terminated). > > What components could I use for this, I've tried MsTscAx.MsTscAx.4 . > I have attached a simple snippet of what I was thinking of executing. > This doesn't even work from a second host, in a normal user session, > hence my doubts about the suitability of the component I'm using. > > Thanks in advance > mr > > '''''''''''''''''''''''''''''''''''' > '''''''''''''''''''''''''''''''''''' > Sub ExecuteConnection(strServer, strUser, strPW) > ' create the client > Dim objMsRdpClient > Set objMsRdpClient = CreateObject("MsTscAx.MsTscAx.4") > objMsRdpClient.Server = strServer > objMsRdpClient.UserName =strUser > objMsRdpClient.FullScreen = false > objMsRdpClient.AdvancedSettings2.RedirectDrives = False > objMsRdpClient.AdvancedSettings2.RedirectPrinters = False > objMsRdpClient.AdvancedSettings2.RedirectPorts = False > objMsRdpClient.AdvancedSettings2.RedirectSmartCards = False > > objMsRdpClient.AdvancedSettings2.ClearTextPassword = strPW > objMsRdpClient.StartConnected = True > WScript.echo "Before connecting" > dim intResult > > ' The following call returns immediately > intResult = objMsRdpClient.Connect > WScript.echo "After connecting Result: " & intResult > > WScript.sleep 10000 > objMsRdpClient.Disconnect > End Sub no-one on this? not even a pointer somewhere?
From: Rob Leitman [MS] on 27 Nov 2006 22:13 What fails, connecting to the computer, or disconnecting the session? If the latter, why not create a logon script that calls tsdiscon.exe to disconnect the session? Rob <mariorivera1974(a)yahoo.co.uk> wrote in message news:1163899973.656171.205890(a)f16g2000cwb.googlegroups.com... > Hi all, > > I have remote 2 user sessions on win 2003 box which i wish to have > running at all times. The sessions sometimes misbehave causing win2003 > to reboot. > > I would like to automatically recreate a client remote session when a > server restarts. It is going to be the same two users every time. > > I was thinking of having a client session initiated with a bootup > script, and then disconnected (not terminated). > > What components could I use for this, I've tried MsTscAx.MsTscAx.4 . > I have attached a simple snippet of what I was thinking of executing. > This doesn't even work from a second host, in a normal user session, > hence my doubts about the suitability of the component I'm using. > > Thanks in advance > mr > > '''''''''''''''''''''''''''''''''''' > '''''''''''''''''''''''''''''''''''' > Sub ExecuteConnection(strServer, strUser, strPW) > ' create the client > Dim objMsRdpClient > Set objMsRdpClient = CreateObject("MsTscAx.MsTscAx.4") > objMsRdpClient.Server = strServer > objMsRdpClient.UserName =strUser > objMsRdpClient.FullScreen = false > objMsRdpClient.AdvancedSettings2.RedirectDrives = False > objMsRdpClient.AdvancedSettings2.RedirectPrinters = False > objMsRdpClient.AdvancedSettings2.RedirectPorts = False > objMsRdpClient.AdvancedSettings2.RedirectSmartCards = False > > objMsRdpClient.AdvancedSettings2.ClearTextPassword = strPW > objMsRdpClient.StartConnected = True > WScript.echo "Before connecting" > dim intResult > > ' The following call returns immediately > intResult = objMsRdpClient.Connect > WScript.echo "After connecting Result: " & intResult > > WScript.sleep 10000 > objMsRdpClient.Disconnect > End Sub >
|
Pages: 1 Prev: Error connecting to existing session Next: Software Restriction Policies and logging |