Всем привет!
Тема многократно обсуждалась на форумах RSDN, но именно такого аспекта я не нашел. Собственно, речь идет о назначении прав разным учетным записям на запуск COM-объектов в режиме служб Windows. Итак, в MSDN написано (в разделе "RunAs"):
"The user-name is taken from the RunAs named-value under the class's AppID key.
Otherwise, the password is retrieved from a secret and secure portion of the registry available only to administrators of the machine and to the system. ...
To establish a password for a RunAs class, you must use the DCOMCNFG administrative tool installed in the system directory."
А вопрос заключается в том, как из моей программы сделать то, что делает DCOMCNFG, т.е. грамотно зашифровать и записать в нужное место пароль той самой учетки.