JSI Tip 9177. How do I delete the 'LEGACY_' keys on my legacy-free Windows XP, Windows Server 2003, or later computer?

Jerold Schulman

March 21, 2005

1 Min Read
ITPro Today logo in a gray background | ITPro Today

NOTE: See Legacy-Free Hardware and BIOS Requirements.

NOTE: See Your legacy-free Windows XP or Windows Server 2003 computer shows a 'Serial' device in Device Manager?

I have scripted LEGACY_Free.bat to delete the LEGACY_ sub-keys at HKEY_LOCAL_MACHINESYSTEMCurrentControlSetEnumRoot.

The syntax for using LEGACY_Free.bat is:

LEGACY_Free

NOTE: LEGACY_Free.bat uses REG.EXE, built into Windows XP, Windows Server 2003, and later operating systems.

LEGACY_Free.bat contains:

@echo offsetlocal ENABLEDELAYEDEXPANSIONfor /f "Tokens=*" %%L in ('reg query HKLMSYSTEMCurrentControlSetEnumRoot^|FIND /I "LEGACY_"') do ( set key=%%L set legacy=HKLM!key:~18! @echo REG DELETE !legacy! /F REG DELETE !legacy! /F @echo.)endlocal



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like