The .old files are safe to delete.
When the program restores the current in use reg files, they are renamed to .old. This is much safer than trying to simply delete them.
When the program does another restore it automatically deletes the .old file if it is already there since a new .old will be coming. But once restored you can delete them if you wish. But just in case they are there if you need them.
So turns out I am a little bit of a dip some times lol. The restore wasn't working properly before.
When I tested the restore of the profile registry I had tested without restoring the system registry.
When replacing the profile registry files I use this "PendingFileRenameOperations"
http://technet.microsoft.com/en-us/library/cc960241.aspxThis of course is in the registry (The SYSTEM hive file)
So when you reboot the system hive file was replaced with those keys gone the profiles didn't get replaced.
Thanks to neroilo for letting me know. Now the question was how the heck do I fix it?
First thing that came to mind was writing another exe to check it and require 2 reboots. System reg files at one reboot and the profiles at the next. I HATED this idea.
So I did some digging and found what I needed. I can load other hive files to the registry to write to them.
So I changed the restore. It now does the user profiles first and then it will then read the "PendingFileRenameOperations" regkey from the current loaded system hive reg file.
Then it will copy the system reg hive file out of the backup to a temp folder (Which it does already) and then it loads that system hive and puts in the PendingFileRenameOperations into the soon to be restore system hive.
Then when the program restores the system hive the PendingFileRenameOperations will be there and the user profiles get restored
So I was able to keep from having to make the restore any harder or any different on the user and got it working even better than before.
EDIT: I appreciate I can set a backup name, but if I don't want it, how can I do?
Should be able to have it blank if you want.
Shane