473,386 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Registry Key extraction and migration

ed
Hi I want to write a tool to do the following:
1. extract and display registry keys under abritrary starting point,
for example:
source are: HKey_Local_machine\software\old_lcoation or
HKey_current_user\software\XXX\YYY

a) then, I can specify where the Keys can be copied and compare the
new location to the new location. For example: destination are:
HKEY_local_mahcine\software\New_location.

b) if the keys are not there flags error message

how canI do that?
Jul 18 '05 #1
1 1508
Ed,

Take a look at _winreg module. It supports
everything you are looking for. You were not
perfectly clear on what keys/values you needed
so the code below is a guess...

Larry Bates
Syscon, Inc.
import _winreg
regkey='software\old_lcoation' # Copied your spelling
value_name="XXX"
key=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, regkey)
value=_winreg.QueryValueEx(key, value_name)[0]

new_value="YYY"
key=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, regkey, 0,
_winreg.KEY_SET_VALUE)
_winreg.SetValueEx(key, value_name, 0, _winreg.REG_SZ, new_value)
"ed" <ed**********@yahoo.com> wrote in message
news:7d**************************@posting.google.c om...
Hi I want to write a tool to do the following:
1. extract and display registry keys under abritrary starting point,
for example:
source are: HKey_Local_machine\software\old_lcoation or
HKey_current_user\software\XXX\YYY

a) then, I can specify where the Keys can be copied and compare the
new location to the new location. For example: destination are:
HKEY_local_mahcine\software\New_location.

b) if the keys are not there flags error message

how canI do that?

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: rob | last post by:
Dear All, I have a very small test project to convert asp to asp.net using the Microsoft/Artisan ASP to ASP.NET Migration Assistant...
14
by: Newbie Coder | last post by:
Hi all, VB.NET 2003 ONLY PLEASE I have a registry key (HKCU\Software\Newbie\SomeKey) of type string which holds an XML string as follows: <root formID="preferencesform" lang="english" ...
16
by: EM.Bateman | last post by:
Working on Visual Studio .Net I've implemented a class: #ifndef CONTRIBUTOR_H #define CONTRIBUTOR_H enum Gender {male=1, female, unk}; #include <iostream> #include <iomanip> #include...
3
Frinavale
by: Frinavale | last post by:
I have been researching the best approach to migrating a VB6 application into a VB.NET application. There is a lot of information out there but most of it recommends that you "train in the migration...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.