Terminal service API

  • Thread starter Thread starter whitethomas12@gmail.com
  • Start date Start date
W

whitethomas12@gmail.com

Guest
I have a question on how to use Terminal Service API. I can
successfully implement it in VbScript, but I am having a very hard
time doing it in .NET. The following is my code in VB.NET 2.0 (Visual
Studios 2005)

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim Tsc As MSTSCLib.IMsRdpClient2
Tsc = New MSTSCLib.MsRdpClient2()
Tsc.DesktopWidth = 49.5
Tsc.DesktopHeight = 50.5


Tsc.Server = "MyServer"

Tsc.UserName = "twhite"
Tsc.AdvancedSettings2.ClearTextPassword = "1234567"
Tsc.Domain = "myDomain"
Tsc.AdvancedSettings2.RedirectDrives = True
Tsc.AdvancedSettings2.RedirectPrinters = True
Tsc.AdvancedSettings2.RedirectPorts = False
Tsc.AdvancedSettings2.RedirectSmartCards = False

Tsc.SecuredSettings2.StartProgram = _
"C:\Program Files\Microsoft office\OFFICE11\EXCEL.EXE"

Tsc.Connect()
End Sub

By theory this should work, but all I get is a blank screen. I tried
to see if there is a client tool that I have to put on the desktop by
going to add toolbox items, but even when I select the RDP client tool
in the COM tab nothing appears.

Can someone please tell me what I am doing wrong

Thank you for all of your hellp in advance
 
Re: Terminal service API

Hi,
Search for TS Royal, it comes with source code, very good.

============================
ThomasT.

Free utilities for TS
http://www.mqtechnologies.com

<whitethomas12@gmail.com> wrote in message
news:bac564df-5a98-4446-85ce-d8d557c09504@s19g2000prg.googlegroups.com...
>I have a question on how to use Terminal Service API. I can
> successfully implement it in VbScript, but I am having a very hard
> time doing it in .NET. The following is my code in VB.NET 2.0 (Visual
> Studios 2005)
>
> Protected Sub Page_Load(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
>
> Dim Tsc As MSTSCLib.IMsRdpClient2
> Tsc = New MSTSCLib.MsRdpClient2()
> Tsc.DesktopWidth = 49.5
> Tsc.DesktopHeight = 50.5
>
>
> Tsc.Server = "MyServer"
>
> Tsc.UserName = "twhite"
> Tsc.AdvancedSettings2.ClearTextPassword = "1234567"
> Tsc.Domain = "myDomain"
> Tsc.AdvancedSettings2.RedirectDrives = True
> Tsc.AdvancedSettings2.RedirectPrinters = True
> Tsc.AdvancedSettings2.RedirectPorts = False
> Tsc.AdvancedSettings2.RedirectSmartCards = False
>
> Tsc.SecuredSettings2.StartProgram = _
> "C:\Program Files\Microsoft office\OFFICE11\EXCEL.EXE"
>
> Tsc.Connect()
> End Sub
>
> By theory this should work, but all I get is a blank screen. I tried
> to see if there is a client tool that I have to put on the desktop by
> going to add toolbox items, but even when I select the RDP client tool
> in the COM tab nothing appears.
>
> Can someone please tell me what I am doing wrong
>
> Thank you for all of your hellp in advance
 
Re: Terminal service API

On Feb 7, 7:57 am, "ThomasT." <Thom...@nospam.nospam> wrote:
> Hi,
> Search for TS Royal, it comes with source code, very good.
>
> ============================
> ThomasT.
>
> Free utilities for TShttp://www.mqtechnologies.com
>
> <whitethoma...@gmail.com> wrote in message
>
> news:bac564df-5a98-4446-85ce-d8d557c09504@s19g2000prg.googlegroups.com...
>
>
>
> >I have a question on how to use Terminal Service API.  I can
> > successfully implement it in VbScript, but I am having a very hard
> > time doing it in .NET.  The following is my code in VB.NET 2.0 (Visual
> > Studios 2005)

>
> > Protected Sub Page_Load(ByVal sender As Object, ByVal e As
> > System.EventArgs) Handles MyBase.Load

>
> > Dim Tsc As MSTSCLib.IMsRdpClient2
> >        Tsc = New MSTSCLib.MsRdpClient2()
> >        Tsc.DesktopWidth = 49.5
> >        Tsc.DesktopHeight = 50.5

>
> >        Tsc.Server = "MyServer"

>
> >        Tsc.UserName = "twhite"
> >        Tsc.AdvancedSettings2.ClearTextPassword = "1234567"
> >        Tsc.Domain = "myDomain"
> >        Tsc.AdvancedSettings2.RedirectDrives = True
> >        Tsc.AdvancedSettings2.RedirectPrinters = True
> >        Tsc.AdvancedSettings2.RedirectPorts = False
> >        Tsc.AdvancedSettings2.RedirectSmartCards = False

>
> >        Tsc.SecuredSettings2.StartProgram = _
> >              "C:\Program Files\Microsoft office\OFFICE11\EXCEL.EXE"

>
> >        Tsc.Connect()
> > End Sub

>
> > By theory this should work, but all I get is a blank screen.  I tried
> > to see if there is a client tool that I have to put on the desktop by
> > going to add toolbox items, but even when I select the RDP client tool
> > in the COM tab nothing appears.

>
> > Can someone please tell me what I am doing wrong

>
> > Thank you for all of your hellp in advance- Hide quoted text -

>
> - Show quoted text -


Does it come with an API for Visual studios?? It is weird, I can get
everything to work with VBScript but not ASP.NET. I need to create a
web application in .NET so that I can add it to my other projects

Thank You
 
Back
Top