Welcometo KORG!

The "loop" marks the end of the loop begun by the "While". Doesn't matter where you put this. The code loops because it enumerates each of the registry keys looking for the one to delete.

This may work, but enumerating registry keys while you are manipulating them isn't usually a good idea. This code looks at a key, determines if it should be deleted, and then either deletes the key (and adds a new printer) or moves on to the next one. Adding the printer adds a value to the key - the same one you're enumerating.

It would be more stable to enumerate the list of printer keys and build an array. Then, enumerate the array, identify the printer(s) to change and make the changes. The new printers are not added to the array when they are added to the registry, reducing the effort and preventing any confusion.

I believe the "load reg to array / enum array" method of printer migration has been discussed here before.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D