Добавление ключа реестра в C# показывает, когда я считал его назад, но не в regedit

Вот некоторые мои:

Выдавание исключения без любой попытки поймать их. Я начал полагаться на NSError все больше, чтобы препятствовать тому, чтобы NSExceptions летел о подобных маркерах в фильме John Woo, но у меня все еще есть много из исключительный код там.

Запись быстрого класса, чтобы сделать X, Y & Z и затем упущение вымыться в dealloc. Утечки на палубе!

Используя строки непосредственно в различных местах (KVO) вместо того, чтобы определить константу и использовать это (см. Dave Dribin, превосходного сообщение в блоге на KVO для больше)

6
задан ICR 8 October 2009 в 23:18
поделиться

5 ответов

Vista introduced registry virtualization; "global" registry changes are, in some cases, redirected to user-specific locations:

Registry virtualization is an application compatibility technology that enables registry write operations that have global impact to be redirected to per-user locations. This redirection is transparent to applications reading from or writing to the registry. It is supported starting with Windows Vista.

This form of virtualization is an interim application compatibility technology; Microsoft intends to remove it from future versions of the Windows operating system as more applications are made compatible with Windows Vista. Therefore, it is important that your application does not become dependent on the behavior of registry virtualization in the система.

Вы можете отключить это, настроив манифест приложения , или вы можете изменить политику только для клавиши, которую вы касаетесь.

WOW64 (вы используете 64-битная версия Vista?) также выполняет перенаправление реестра . Это меня раздражает.

См. статью MSDN о виртуализации реестра .

16
ответ дан 8 December 2019 в 12:21
поделиться

This sounds like a registry virtualisation issue. If the user of your app is not an administrator, then the registry write will be virtualised into a per-user virtual store -- though if your other program is running under the same account then it should still be able to see that per-user setting...

The linked page tells you where to find the virtual store to check this theory.

3
ответ дан 8 December 2019 в 12:21
поделиться

Можете ли вы сказать, какой улей вы просматриваете в реестре? я могу предположить, что вы случайно искали не в том месте.

0
ответ дан 8 December 2019 в 12:21
поделиться

Sounds to me that, even though you think you're running with elevated privileges, you're not - and that your programs registry access is being silently redirected somewhere safe.

Check out Registry Virtualization for details.

0
ответ дан 8 December 2019 в 12:21
поделиться

You may not have the privileges that you think you do. With the UAC on, the OS will create a virtual registry for you to write to if you do not have sufficient privileges to write to the 'real' registry (same goes for the file system.)

0
ответ дан 8 December 2019 в 12:21
поделиться
Другие вопросы по тегам:

Похожие вопросы: