'Burke 'Ramsinks.com Option Explicit Set ws = WScript.CreateObject("WScript.Shell") Dim ws, t, p1, n, cn, MyBox, vbdefaultbutton Dim itemtype p1 = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\" n = ws.RegRead(p1 & "PortNumber") t = "Change Port Number for Remote Desktop" cn = InputBox("Type in the new port number", t, n) If cn <> "" Then ws.RegWrite p1 & "PortNumber", cn, "REG_DWORD" End If MyBox = MsgBox("Please restart for the changes to take effect.",vbOKOnly + vbInformation,"Ramsinks.com")