Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. COleTemplateServer. UpdateRegistry() function failing on VISTA.

COleTemplateServer. UpdateRegistry() function failing on VISTA.

Scheduled Pinned Locked Moved C / C++ / MFC
comwindows-adminquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sameer_Thakur
    wrote on last edited by
    #1

    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

    V B D 3 Replies Last reply
    0
    • S 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

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      http://www.cryer.co.uk/newsgroups/bp_delphi_rtl_win32/200612/0612301610.htm[^]

      Vasudevan Deepak Kumar Personal Homepage Tech Gossips

      1 Reply Last reply
      0
      • S 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

        B Offline
        B Offline
        bob16972
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • S 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

          D Offline
          D Offline
          DanPetitt
          wrote on last edited by
          #4

          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[^]

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups