c# Clean a registry file .reg to remove duplicate entries -


I have a company that I work sometimes uses super mandatory profiles for their users unfortunately it too Problems can arise that user settings are not logged on and saved at all. Running on a .reg file startup to work around this. Some of these settings were used to change the settings and record making a reg file created from this. The problem with this is that they are doing a lot of duplicate entries, so that it has grown bigger and bigger every time. The way I have not implemented this process, just stay with it.

I'm going to try to minimize it down, but I am surprised that there is this what I think before, I read the lines in a 2d array: [/ *] > "OTTFrmW" = "420"
"OTTFrmH" = "321"
becomes

:
[HKEY_CURRENT_USER \ software \ CELCAT \ CT \ sat \ Settings], "Otititivis" = "0" [HKEY_CURRENT_USER \ software \ CELCAT \ CT \ sat \ Settings], "OTTFrmW" = "420" [HKEY_CURRENT_USER \ software \ cELCAT \ CT \ SAT Settings] "OTTFrmH" = "321"

Then duplicate the reverse and Eliminate the fear to make a setting to remove the entries can be changed twice, the first file.

then output to sort the array from the hive and key each time dove when sorry it changes if the terminology is wrong.

Will this work? It is better to use an archive instead of an array, but you get this idea.

For the first try I read in a tree to a .reg file, just looks way regedit is. By creating a tree, just check if a node exists. If not, then created it and overwritten the existing value.

So you will only receive the final entry that will take effect. After making this tree, you will have to read the current tree and you are ready.

While writing this, I'll get another idea: Open .reg file in Text Editor. "[HKEY_CURRENT_USER \ JustSomeKeyThatDoesNotExists"] and replace this file in the registry. Now open Registry and open the entire "[HKEY_CURRENT_USER \ JustSomeKeyThatDoesNotExists"] file export in a file and open the first replacement backwards.

You will now have a file with a unique value in a serial order. ; -))


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -