Migrating ODBC information through a batch file

Posted by DeskSide on Server Fault See other posts from Server Fault or by DeskSide
Published on 2012-11-20T17:21:56Z Indexed on 2014/06/13 15:27 UTC
Read the original article Hit count: 187

Filed under:
|
|

I am a desktop support technician currently working on a large scale migration project across multiple sites. I am looking at a way to transfer ODBC entries from Windows XP to Windows 7. If anyone knows of a program or anything prebuilt that already does this, please redirect me. I've already looked but haven't found anything, so I'm trying to build my own.

I know enough basic programming to read the work of others and monkey around with something that already exists, but not much else. I have come across a custom batch file written at one site that (among other things) exports ODBC information from the old computer and stores it on a server (labelled as y: through net use at the beginning of the file), then later transfers it from the server to a new computer. The pre-existing code is for Windows XP to XP migrations. Here are the pertinate bits of code:

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

(and later on)

echo Importing ODBC
start /wait regedit /s "y:\%username%\odbc.reg"

We are now migrating from Windows XP to 7, and this part of the batch file still seems to work for this particular site, where Oracle 8i and 10g are used. I'm looking to use my cut down version of this code at multiple sites, and I'm wondering if the same lines of code will still work for anything other than Oracle.

Also, my research on this issue has shown that there are different locations in 64 bit operating systems for 32/64 bit entries, and I'm wondering what effect that would have on the code. Could I copy the same data to both parts of the registry, in hopes of catching everything?

Any assistance would be appreciated. Thank you for your time.

© Server Fault or respective owner

Related posts about Windows

Related posts about batch