Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Registry nightmare.

Status
Not open for further replies.

wbeetge

Programmer
May 2, 2002
57
ZA
IS there an easy way to remove OCX compilation registrations and values from the registy ?

I need to create the ocx at V1.0 level. if during development, I compile a version for testing, it is incremented and compatability issues start.
If I or another staff member in my team wrongly compiles the OCX or the quality control requires a change in the OCX, I need to "reset" or rather "remove" all values updated for the OCX in the registry as if it has never been compiled.
 
Hi webeetge.
I am hoping that I understand your current issue and need here - if not, please forgive me. If you are simply trying to register and/or unregister ocx take a look at this and see if it is of any use to you. I have used this twice now to register and unregister and it appears to have done the job sufficiently.
Hope this is of some help to you.

ViperGTS
 
There's another way to register/unregister controls that I find a lot easier. It adds items to the Windows Explorer drop down menu. So all you have to do is right click the .OCX and then you can register/unregister it.

You can find it at or just download it at
Hope it makes life easier :)
 
To ViperGTS and FRoeCassNet

Thanks for your replies, but i am not worrying about how to register an OCX, but the Registry enties made by VB when an ocx is compiled.

Every time you compile the ocx, it along with all classes used by the OCX is written into the registry under a multitude of structures.
Part of this registry routine that VB does, is to create the version number of the ocx. If you compile it twice, you will have a reference in the registy that has both version 1 and 2 information.

The only way to rebuild the ocx as Version 1 is to edit the registry and to search for all entries with the name of the ocx and classes and proprty pages that are part of the ocx and delete then from the registry.

This method of cleaning up the registry before re-copmiling to get version 1 again is extremely time consuming.

What I am lloking for is a way to take a snapshot of the registry before iI compile the ocx and restore that snapshot to the registry after the compile.

You got any ideas ?
 
Ok I better understand . . .this I believe is what you need:

Go to Start:
type regedit in run box.

At the top, of left panel right click once to collapse and then once this is done, right click and select export. This will copy all current settings. Send the copy to your desktop. Make sure it is there - this may take a few moments depending on how fast your system is.
This is a copy "snap-shot" of your registry at that moment.

When you want to restore to that 'moment' (those registry settings), go to desktop, double click and it will ask you if you want to restore these settings (your CYA snap-shot). Your answer should be yes and that will reset to the time of when you took the original "snapshot". This too may take a few moments - be sure that nothing else is running so that all settings are restored properly.

Hope that this is more defined answer to your question.

ViperGTS
 
Sorry - should be right click on My Computer to collaps and then right click again to export.
Do this before you make any changes and you will be able to restore to those values prior to whatever changes you have made since the export.

ViperGTS
 
Do you use normal regedit ?
My rightclick on My Computer does not give me the option to export. I can do this from the File menu.

When I try to restore, it asks me if I want to add the references to my registry, and does not seem to replace it with the snapshot.
 
wbeetge,
I am running XP but if I remember correctly this process is the same for Windows 98 and all those in between as well.
When I go to 'regedit' and right click 'My Computer' in the Registry Editor I get the option to export.
But yes, you can also use File / Export from the Registry Editor as well, with the 'My Computer' icon (in the explorer of Reg Edit) highlighted, go to File, then select the Export option. Send it off to your desk top and you have a copy.
When you say that it, "...does not seem to replace it with the snapshot" are you receiving some error message? If you are you may want to be sure that all apps are closed and then go to "Control + Alt + Delete" one time to get the Task Manager and be sure that you have nothing running in the background. The reg restore will give an error telling you that it cannot replace all reg-keys if there is infact something running.
When the restore is finished and all keys are restored you should be getting a message that indicates this.
Please feel free to let me know if there is further trouble with the issue as I would like to see you have this resolved.
Please let me know how it goes!

Regards,

ViperGTS
 
I appreciate it. Will let you know later in the day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top