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.

The Author — Nirmal Sharma

Nirmal Sharma avatar

Nirmal Sharma is a MCSEx3, MCITP, and was awarded Microsoft MVP in Directory Services. In his spare time, he likes to help others and share some of his knowledge by writing tips and articles for various online communities. Nirmal can also be found contributing to PowerShell based Dynamic Packs for ADHealthProf.ITDynamicPacks.Net solutions.

Latest Contributions

Featured Links