Re: Enabling RDP via a login script

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



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@xxxxxxxxx> wrote in message
news:1162996502.030067.304030@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.


.



Relevant Pages

  • Enabling RDP via a login script
    ... I want to enable RDP on all my workstations so I added this chunk of ... ' This part will enable RDP on the workstation ... Const HKLM = &H80000002 ... objReg.SetDWORDValue HKLM, strKeyPath, _ ...
    (microsoft.public.scripting.vbscript)
  • Re: Enabling RDP via a login script
    ... Probably the ones that haven't been rebooted since the script ... ' This part will enable RDP on the workstation ... Const HKLM = &H80000002 ... objReg.SetDWORDValue HKLM, strKeyPath, _ ...
    (microsoft.public.scripting.vbscript)
  • Re: Enabling RDP via a login script
    ... I want to enable RDP on all my workstations so I added this chunk of ... ' This part will enable RDP on the workstation ... Const HKLM = &H80000002 ... objReg.SetDWORDValue HKLM, strKeyPath, _ ...
    (microsoft.public.scripting.vbscript)
  • Re: Enabling RDP via a login script
    ... Okay, nevermind, the script is working, RDP is enabled, but I just ... Const HKLM = &H80000002 ... objReg.SetDWORDValue HKLM, strKeyPath, _ ...
    (microsoft.public.scripting.vbscript)
  • Re: Errors 70 & 424?
    ... when testing the script I get the following error: ... objReg.DeleteKey HKCU, strKeyPath & strAOLKeyPath ... objReg.DeleteKey HKCU, strKeyPath & strNapsterKeyPath ...
    (microsoft.public.scripting.vbscript)