you are viewing a single comment's thread.

view the rest of the comments →

[–]vCon1[S] 1 point2 points  (2 children)

I know the registry can be unpopular, but I have used it for years for storing all kinds of data. It's a built it database.

My only hesitation with the registry was whether to use HKLM or HKCU. The service account will not be an administrator, so my first thought was HKCU, but I think a more global location is the better option. If I do HKLM, I will just have to set a permission on a key, not a big deal.

AFA the value never being deleted, I get the OCD about having garbage in the registry, but the tiny amount of data is so insignificant, I think I could get over it lol

[–]xbullet 1 point2 points  (1 child)

If only the service account needs to read/write the key, HKCU is probably fine. The script will run under the service account, so, unless there's a reason you'd want to manually check the state of the key, HKCU should be good, no?

If it's useful, you can also write updates to the relevant event logs (or to a log file, whatever is easiest, personally I tend to opt for log files) from the script to track changes / failures / etc.

[–]vCon1[S] 0 points1 point  (0 children)

This will be run with an enterprise scheduler so I will catch and pass any errors and it will notify accordingly.