Hi,

I want to enable RDP on all my workstations so I added this chunk of
code to my login script.

' ******************************************************************
' This part will enable RDP on the workstation
' ******************************************************************
Dim objReg, strKeyPath
Const HKLM = &H80000002
strKeyPath = "SYSTEM\CurrentControlSet\" _
& "Control\Terminal Server"
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
strComputer & "\root\default:StdRegProv")
objReg.SetDWORDValue HKLM, strKeyPath, _
"fDenyTSConnections", "0" '0 enables RDP; 1 disables RDP

I receive no errors but it just doesn't work! Can any one see anything
wrong with the above code?

Thanks.

Re: Enabling RDP via a login script by K

K
Wed Nov 08 08:31:55 CST 2006

Oh, and earlier in the script is the code:

Dim objNetwork, strComputer
Set objNetwork = WScript.CreateObject("WScript.Network")
strComputer = objNetwork.ComputerName

Thanks
K.J. 44 wrote:
> Hi,
>
> I want to enable RDP on all my workstations so I added this chunk of
> code to my login script.
>
> ' ******************************************************************
> ' This part will enable RDP on the workstation
> ' ******************************************************************
> Dim objReg, strKeyPath
> Const HKLM = &H80000002
> strKeyPath = "SYSTEM\CurrentControlSet\" _
> & "Control\Terminal Server"
> Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
> strComputer & "\root\default:StdRegProv")
> objReg.SetDWORDValue HKLM, strKeyPath, _
> "fDenyTSConnections", "0" '0 enables RDP; 1 disables RDP
>
> I receive no errors but it just doesn't work! Can any one see anything
> wrong with the above code?
>
> Thanks.


Re: Enabling RDP via a login script by K

K
Wed Nov 08 08:35:02 CST 2006

Okay, nevermind, the script is working, RDP is enabled, but I just
cannot seem to RDP in on the PC.


K.J. 44 wrote:
> Hi,
>
> I want to enable RDP on all my workstations so I added this chunk of
> code to my login script.
>
> ' ******************************************************************
> ' This part will enable RDP on the workstation
> ' ******************************************************************
> Dim objReg, strKeyPath
> Const HKLM = &H80000002
> strKeyPath = "SYSTEM\CurrentControlSet\" _
> & "Control\Terminal Server"
> Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
> strComputer & "\root\default:StdRegProv")
> objReg.SetDWORDValue HKLM, strKeyPath, _
> "fDenyTSConnections", "0" '0 enables RDP; 1 disables RDP
>
> I receive no errors but it just doesn't work! Can any one see anything
> wrong with the above code?
>
> Thanks.


Re: Enabling RDP via a login script by bob

bob
Wed Nov 08 09:39:48 CST 2006

im sure you can after a reboot.

"K.J. 44" <Holleran.Kevin@gmail.com> wrote in message
news:1162996502.030067.304030@h48g2000cwc.googlegroups.com...
> Okay, nevermind, the script is working, RDP is enabled, but I just
> cannot seem to RDP in on the PC.
>
>
> K.J. 44 wrote:
>> Hi,
>>
>> I want to enable RDP on all my workstations so I added this chunk of
>> code to my login script.
>>
>> ' ******************************************************************
>> ' This part will enable RDP on the workstation
>> ' ******************************************************************
>> Dim objReg, strKeyPath
>> Const HKLM = &H80000002
>> strKeyPath = "SYSTEM\CurrentControlSet\" _
>> & "Control\Terminal Server"
>> Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
>> strComputer & "\root\default:StdRegProv")
>> objReg.SetDWORDValue HKLM, strKeyPath, _
>> "fDenyTSConnections", "0" '0 enables RDP; 1 disables RDP
>>
>> I receive no errors but it just doesn't work! Can any one see anything
>> wrong with the above code?
>>
>> Thanks.
>



Re: Enabling RDP via a login script by K

K
Wed Nov 08 14:55:17 CST 2006

I will try that. That makes sense because it is only a handful of the
PCs. Probably the ones that haven't been rebooted since the script
ran.

Thanks!

bob m wrote:
> im sure you can after a reboot.
>
> "K.J. 44" <Holleran.Kevin@gmail.com> wrote in message
> news:1162996502.030067.304030@h48g2000cwc.googlegroups.com...
> > Okay, nevermind, the script is working, RDP is enabled, but I just
> > cannot seem to RDP in on the PC.
> >
> >
> > K.J. 44 wrote:
> >> Hi,
> >>
> >> I want to enable RDP on all my workstations so I added this chunk of
> >> code to my login script.
> >>
> >> ' ******************************************************************
> >> ' This part will enable RDP on the workstation
> >> ' ******************************************************************
> >> Dim objReg, strKeyPath
> >> Const HKLM = &H80000002
> >> strKeyPath = "SYSTEM\CurrentControlSet\" _
> >> & "Control\Terminal Server"
> >> Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
> >> strComputer & "\root\default:StdRegProv")
> >> objReg.SetDWORDValue HKLM, strKeyPath, _
> >> "fDenyTSConnections", "0" '0 enables RDP; 1 disables RDP
> >>
> >> I receive no errors but it just doesn't work! Can any one see anything
> >> wrong with the above code?
> >>
> >> Thanks.
> >