Break Server Core registry to disallow processing of Run and RunOnce entries

by [Published on 28 Aug. 2008 / Last Updated on 3 July 2008]

This article will show you how you can disallow processing of Run and RunOnce registry entries. This article applies to Windows Server 2008 Server Core Edition only!

By default, when you install Server Core, it is configured to process the Run and RunOnce registry entries during the log on.

You can prevent this behaviour by removing the part of the full command configured at following registry location:

Key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
Entry Name: Shell
Value: cmd.exe /c “cd /d “%USERPROFILE%” & start cmd.exe /k runonce.exe /AlternateShellStartup”

You need to remove “/k runonce.exe /AleternateShellStartup” from the above value and then restart the system for the changes to take affect.

See Also

The Author — Nirmal Sharma

Nirmal Sharma avatar

Nirmal Sharma is a MCSEx3, MCITP and was awarded the Microsoft MVP award in Directory Services and Windows Networking. He specializes in Microsoft Azure, Office 365, Directory Services, Failover Clusters, Hyper-V, PowerShell Scripting and System Center products. Nirmal has been involved with Microsoft Technologies since 1994. In his spare time, he likes to help others and share some of his knowledge by writing tips and articles on various sites and contributing to PowerShell-based Dynamic Packs for www.ITDynamicPacks.Net solutions.

Featured Links