How do I export a key in ANSI format from the registry?

A. To export a key from the registry in ANSI format, use the /a switch:

regedit /a <registry file> "<registry key>"

For example, the following command exports the HKEY_LOCAL_MACHINE\Software key in ANSI format from the hklm.reg file.

regedit /a c:\hklm.reg "HKEY_LOCAL_MACHINE\Software"
<br>

Discuss this Article 3

Ferran (not verified)
on Feb 27, 2003
The command is "regedit /e", not "regedit /a"
Anonymous User (not verified)
on Mar 18, 2005
The /e switch saves in the Windows Registry Editor Version 5.00 format used by Win 2K and XP. The /a switch specifies REGEDIT4 format, which is used by earlier versions of Windows but still compatible with later ones.

Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottYou'll have the opportunity to experience:
• The Microsoft
Technology Roadmap
• Office 365 Implementation
• Hyper-V Optimizing
• Windows 8 Deployment
and much more!

Come See Paul Thurrott & Rod Trent in Person!

Early Registration Now Open

Upcoming Training

Mastering System Center 2012

During over 6 hours of training you can join John Savill from your computer as he will walk you through the key components and capabilities of System Center 2012, what’s involved in using the components, and the benefit they can bring to your environment.

Register Now

Current Issue

May 2013 - The NameTranslate object is useful when you need to translate Active Directory object names between different formats, but it's awkward to use from PowerShell. Here's a PowerShell script that eliminates the awkwardness.

CURRENT ISSUE / ARCHIVE / SUBSCRIBE

Windows Forums

Get answers to questions, share tips, and engage with the Windows Community in our Forums.