Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Remote Desktop Port Change

Posted on July 18, 2013October 26, 2015 By David Kittell
'Kelly Theriot 11-2004
'Kelly's Korner

Option Explicit

Set ws = WScript.CreateObject("WScript.Shell")
Dim ws, t, p1, n, cn, MyBox, vbdefaultbutton
Dim itemtype

p1 = "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-Tcp"

n = ws.RegRead(p1 & "PortNumber")
t = "Change Port Number"
cn = InputBox("Type in the new port number", t, n)
If cn <> "" Then
  ws.RegWrite p1 & "PortNumber", cn
End If

MyBox = MsgBox("Once done hit refresh (F5) for the changes to take effect.", vbOKOnly,"Done")
Originally Posted on July 18, 2013
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code Windows VBS

Post navigation

Previous post
Next post

Related Posts

Test Password Strength

Posted on February 2, 2015October 26, 2015

$(‘#pass’).keyup(function(e) { var strongRegex = new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\W).*$", "g"); var mediumRegex = new RegExp("^(?=.{7,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))).*$", "g"); var enoughRegex = new RegExp("(?=.{6,}).*", "g"); if (false == enoughRegex.test($(this).val())) { $(‘#passstrength’).html(‘More Characters’); } else if (strongRegex.test($(this).val())) { $(‘#passstrength’).className = ‘ok’; $(‘#passstrength’).html(‘Strong!’); } else if (mediumRegex.test($(this).val())) { $(‘#passstrength’).className = ‘alert’; $(‘#passstrength’).html(‘Medium!’); } else { $(‘#passstrength’).className =…

Read More

C# String Like

Posted on March 15, 2014October 26, 2015

I had a need to find a string like function similar to MSSQL and found this useful function. public static bool StringLike(this string toSearch, string toFind) { return new Regex(@"A" + new Regex(@".|$|^|{|[|(|||)|*|+|?|").Replace(toFind, ch => @"" + ch).Replace(‘_’, ‘.’).Replace("%", ".*") + @"z", RegexOptions.Singleline).IsMatch(toSearch); } bool willBeTrue = StringLike("abcdefg","abcd_fg"); bool willAlsoBeTrue…

Read More

MS SQL Import Txt File

Posted on October 15, 2013October 26, 2015

sqlcmd -i nonMemLoad.txt -o sqllog.txt Reference: http://msdn.microsoft.com/en-us/library/ms170572.aspx Originally Posted on October 15, 2013Last Updated on October 26, 2015 All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes