COleTemplateServer. UpdateRegistry() function failing on VISTA.
-
Hi. In my application, I am calling COleTemplateServer'sObj. UpdateRegistry(OAT_DISPATCH_OBJECT); function inside InitInstance() to load file-type information from the document-template string and places that information in the OLE system registry. It works fine for Windows98, XP,2000, etc. but on Vista OS, it fails. What could be the reason? Is there any solution for this?
Sameer Thakur
-
Hi. In my application, I am calling COleTemplateServer'sObj. UpdateRegistry(OAT_DISPATCH_OBJECT); function inside InitInstance() to load file-type information from the document-template string and places that information in the OLE system registry. It works fine for Windows98, XP,2000, etc. but on Vista OS, it fails. What could be the reason? Is there any solution for this?
Sameer Thakur
http://www.cryer.co.uk/newsgroups/bp_delphi_rtl_win32/200612/0612301610.htm[^]
Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
Hi. In my application, I am calling COleTemplateServer'sObj. UpdateRegistry(OAT_DISPATCH_OBJECT); function inside InitInstance() to load file-type information from the document-template string and places that information in the OLE system registry. It works fine for Windows98, XP,2000, etc. but on Vista OS, it fails. What could be the reason? Is there any solution for this?
Sameer Thakur
If you go to administrative tools, Local Security Policy, Local Policies, Security Options, and scroll to the "User Account Control:" settings and disable them (Just for testing) and try what you are trying and it works, then you found the culprit(s). You may need to logoff/logon or restart to get the new settings to apply. However, how to get around it in the general sense without end users needing to change security settings is proving to be very difficult. Hope that helps to at least narrow your problem context a bit. -- modified at 15:06 Thursday 29th March, 2007
-
Hi. In my application, I am calling COleTemplateServer'sObj. UpdateRegistry(OAT_DISPATCH_OBJECT); function inside InitInstance() to load file-type information from the document-template string and places that information in the OLE system registry. It works fine for Windows98, XP,2000, etc. but on Vista OS, it fails. What could be the reason? Is there any solution for this?
Sameer Thakur
It is because UpdateRegistry resets some registry entries in HKEY_CLASSES_ROOT and as Vista wont allow you to do this you will get an error (on my product I just get an empty message box!). The best way is to test if you have write access to the registry before calling the UpdateRegistry method as per this KB article: http://support.microsoft.com/kb/254957[^]