Results 1 to 8 of 8

Thread: Registry and Vista

  1. #1

    Registry and Vista

    I have been trying to get a program working correctly with Windows Vista.

    It currently works correctly for Windows XP. However, I am having problem with the copy protection.

    The "administrator" has to run the registration process. Upon registration the settings are stored in HKEY_LOCAL_MACHINE. These are readable to all users. So once the admin has registered the software all users of that machine have the licensed version available.

    Now the problem.

    In Windows Vista the HKEY_LOCAL_MACHINE is not written to and instead the values are stored in a "virtual store" that is local to the administrator's account - in other words the other users still only have access to the demo version.


    Questions:
    1. If I cannot write to local_machine where then should I write these settings?
    2. With Delphi 7 is it possible to force Windows Vista to go to the highest privileges level? And if so how?

    I know vista isn't out yet so most of you won't have any experience with it yet. I can tell you it is going to be pain to get older software working with vista
    The views expressed on this programme are bloody good ones. - Fred Dagg

  2. #2

    Registry and Vista

    did you try right clicking the application and selecting "Run as Administrator"?

    admins are run as standard user until they need to be admins, so i guess because it works with the registry redirection, its running as standard user

  3. #3

    Registry and Vista

    Yes I tried that - however the hkey_local_machine registry codes still ended up in a virtual store - which is local and not accessible by teh other accounts on the system.
    The views expressed on this programme are bloody good ones. - Fred Dagg

  4. #4

    Registry and Vista

    Is it possible to use a file registry instead of the system registry?

  5. #5

    Registry and Vista

    That would be an option. That also comes with problems. You need to set up a public directory.

    I understand that M$ wants developers to put application data into the "documents and settings" directory structure - however, none of these directories seem to be easily shareable.

    So it come sback to using a shared public directory off the c: drive - e.g. c:\MyApp

    Which begs the question why not install the entire project in that directory and have done with it?

    The more I work with Vista the more I feel M$ has "fixed" things that weren't broken - it is a frustrating experience.
    The views expressed on this programme are bloody good ones. - Fred Dagg

  6. #6

    Registry and Vista

    Quote Originally Posted by czar
    So it come sback to using a shared public directory off the c: drive - e.g. c:\MyApp

    Which begs the question why not install the entire project in that directory and have done with it?
    If M$ wants everyone to use their shared folder structure, they should have made it in a way that benefits it's use. If they are pushing so much, most developers just won't use it, and I think the reaction of M$ will be to return to a simple structure in the following versions of Windows.

  7. #7

    Registry and Vista

    what about the "C:\Users\Public" folders?

  8. #8

    Registry and Vista

    Ok I solved the problem. I will explain the solution so that others will find it a bit easier to work with Vista in the future.

    The important thing is that even an Administrator does not have "administrator" rights by default. The admin is running their session with lower rights. That means any program that tries to write to hkey_local_machine will in fact be storing that information into a local store. i.e. that info will not be available to other users on the system.

    Solution run the app by right clicking and selecting "run as administrator" (I know Tux suggested it above, but while trying many things I didn't spot the fact that it had succeeded when I tried that.).

    Make sure you only use hkey_current_user unless it needs to be system wide. Do not change any files in Program Files after the initial install - any application data should go to the directory of the same name in Documents and Settings.

    If anyone else can add any more Vista Tips then please do.
    The views expressed on this programme are bloody good ones. - Fred Dagg

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •