Posts Tagged ‘registry’

Remotely enable RDP.

Download psexec.exe to run commands remotely on the remote machine.
See Windows 10 note at the end of this post.

Once installed, run psexec to bring up a command prompt on the remote machine:
C:\Tools> psexec \\remotecomputer cmd

Turn off the firewall:
C:\Windows\system32> netsh advfirewall set currentprofile state off
Default Profiles: AllProfiles, CurrentProfile, DomainProfile, PrivateProfile, or PublicProfile.

Create a rule to allow Remote Desktop through the firewall:
C:\Windows\system32> netsh advfirewall firewall set rule group=”Remote Desktop Access” new enable=Yes

These netsh commands will return an “Ok!” when successful.

Next ensure that the “Remote Registry” service is started, so you can modify the registry to enable Remote Desktop:
C:\Windows\system32> net start “Remote Registry”

Then, from your local machine open regedit and select File/Connect Network Registry…
Enter the name or I.P. address of the remote machine.
Once connected, navigate to “REMOTEMACHINE\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server”
Then, double click fDenyTSConnections and change it from a 1 to a 0.

Then, back on your psexec session restart the “Remote Desktop Services” service:
C:\Windows\system32> net stop “Remote Desktop Services”
C:\Windows\system32> net start “Remote Desktop Services”

Now, you should be able to connect, and still connect after rebooting if you set the “Remote Desktop Services” service to Automatic so it starts at boot.

Windows 10 note:
You can also use REG.EXE to edit the registry from your PSEXEC.EXE session. This worked well for Windows 10 without needing to enable Remote Administration:
C:\Windows\system32> REG ADD “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server” /v fDenyTSConnections /t REG_DWORD /d 0 /f

Enable automatic Administrator login – Windows server

I don’t really like to do this, but sometimes you are left with no choice. Here is how to have a Windows server automatically login to the Administrator account:

Run regedit.

Navigate to:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]

Right mouse click on Winlogon and add the following String Values with the following settings:

“AutoAdminLogon”=”1”
“DefaultUsername”=”mydomain\Administrator”
“DefaultPassword”=”mypassword”

Then, reboot.

Modify Windows registry using VB script.

Here is an example of a VB script I used to set the domain suffix search list on a Windows machine. I just saved the following in a file with a vbs extension and executed the script.

SET WSHShell = CreateObject(“WScript.Shell”)

WSHShell.RegWrite “HKLM\System\CurrentControlSet\Services\TCPIP\Parameters\SearchList”, “mydomain1.com,mydomain2.com”, “REG_SZ”

Windows NT 4.0/2000/2003 Server file system performance tweak

I made this modification on an HP DL-360 with dual 1.3 GHz processors, 2GB of memory, and RAID 1 drive (two drives mirrored). It made a huge improvement accessing a directory with a lot of files. According to Microsoft (, ), the setting is increased in Windows 2003. I set in my NT 4.0 server to 16,644.

The SizReqBuf value is stored in the registry under the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
Value Name: SizReqBuf
Data Type : REG_DWORD
Data : 512 – 65535 (bytes in decimal, or 200 – FFFF hexadecimal)
Default : 4356 Specifies the size of request buffers that the server uses.

Source: http://support.microsoft.com/kb/320829

Return top

INFORMATION