C
C
Che_Bu_Rashka2016-07-25 18:37:25
Delphi
Che_Bu_Rashka, 2016-07-25 18:37:25

Software interaction with each other and store settings in 64 (and 32)-bit applications in the registry, right?

Написал 2 софтины (служба и клиентское приложение) на платформе 32-бит. Они общаются через реестр, ибо решил возложить на систему проблему совместного и одновременного доступа к настройкам этого хозяйства. Работают в таком ключе - клиентское ПО по запросу пользователя , что-то меняет в реестре (настройки), служба мониторит и дальше работает с новыми параметрами.
Наелся с этим...
1) Проблема при старте системы служба не может прочитать реестр, она стартует раньше чем входит пользователь (который может и не войти), причем иногда может прочитать, иногда нет. А допустим нужно получить какие-то настройки уже сразу, но реестр в ауте.. Что тут можно сделать?
2) где вообще лучше хранить настройки, чтобы имелся одновременный доступ к ним из разных программ на чтение и запись?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mikhail Usotsky, 2016-07-25
@Aquarius-Michael

It's better to store the settings in the savings bank, that is, store the settings in files and name them whatever you want. Keeping it in the registry is not the best idea.

A
Alex, 2016-07-26
@streetflush

Windows now has virtualization of both the registry and programmfiles.
So the Temp folder is in your hands (the path is pulled from the system variable). If it's over, it's not too critical to lose settings after cleaning with CCleaner.
And HKLM is a very bad decision because of the rights ... HKCU is better if the service does not start from the system account.

K
kalapanga, 2016-07-26
@kalapanga

In my opinion, it would be better to complete the software to a full-fledged client-server application. And this communication through files or the registry is generally excluded. Only the server will read / write settings, where it is allowed. And the client will connect to it and instruct to change this or that parameter.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question