Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing a batch file to migrate certain settings from one windows machine to another. I'm having problems with the regedit /e switch.

In the script, I'm exporting ODBC system entries and Internet Explorer Trusted Sites. The ODBC command exports successfully, but the Trusted Sites command doesn't.

echo Exporting ODBC Information
start /wait regedit.exe /e "y:\%username%\odbc.reg" HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI

echo Exporting IE Trusted Sites

Do I need to tack on something after DOMAINS?

Thanks for the help! I'm either breaking new ground with this, or the problem is so simple that the solution appears nowhere on the Internet. Sigh

share|improve this question
up vote 2 down vote accepted

There's a space in the key path. Wrap it in double-quotes.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.