Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 286785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:40:04+00:00 2026-05-12T05:40:04+00:00

A company I work for sometimes uses super mandatory profiles for their users. Unfortunately

  • 0

A company I work for sometimes uses super mandatory profiles for their users. Unfortunately this can cause lots of issues with user settings not being saved at log off and so on. To work around this a .reg file is run at startup. For some of these settings regmon was used to record making the settings change and a reg file created from this. The trouble with this is their are lots of duplicate entries making it larger and larger each time this has been done. By the way I didn’t implement this procedure I just have to live with it.

I am going to attempt to clean this down to it’s minimum but am wondering if anyone has done this before. What I am thinking is, I read the lines into an 2d array so:

[HKEY_CURRENT_USER\Software\CELCAT\CT\SAT\Settings]
“OpenTTVS”=”0”
“OTTFrmW”=”420”
“OTTFrmH”=”321”

becomes:
[HKEY_CURRENT_USER\Software\CELCAT\CT\SAT\Settings], “OpenTTVS”=”0”
[HKEY_CURRENT_USER\Software\CELCAT\CT\SAT\Settings], “OTTFrmW”=”420”
[HKEY_CURRENT_USER\Software\CELCAT\CT\SAT\Settings], “OTTFrmH”=”321”

Then remove duplicates in reverse order so if a setting is changed twice it removes the entries first in the file.

Then sort the array by the hive and output the key every time and the hive when it changes. Sorry if the terminology is wrong.

Will this work? Probably better using a collection rather than an array but you get the idea.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:40:04+00:00Added an answer on May 12, 2026 at 5:40 am

    For a first try i would read this .reg file into a tree, just the way regedit looks like. By building up the tree you just check if a node exists. If not, created it else overwrite the existing value.

    So you’ll get just the last entry which take into effect. After creating this tree, you’ll have to read back the current tree and you’re ready.

    While writing this, i’ll got another idea:
    Open the .reg file in a texteditor. Replace “[HKEY_CURRENT_USER\” against “[HKEY_CURRENT_USER\JustSomeKeyThatDoesNotExists” and import this file into the registry. Now open the registry and export the whole “[HKEY_CURRENT_USER\JustSomeKeyThatDoesNotExists” back into a file. Open the file and make the first replacement backwards.

    Now you’ll have a file with unique value in a sorted order. ;-))

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The company I work for now uses a set naming convention for their C#
The company I work for currently uses some basic functions to abstract the OCI
The company I work in has suffered a major server failure. During this failure
The company I work for want to put their help files online and they
The company I work for only has standard edition, and can not afford a
The company I work for has a very old system that uses Paradox. I
In a company I work for we have an app that shows TV-programs. Users
the company I work for has a web-based user interface which paying clients log
The company I work for is looking for a reporting solution with the following
The company I work for is looking to implement a caching solution. We have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.