Results 1 to 8 of 8

Thread: Current User registry keys with Elevated Install

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Current User registry keys with Elevated Install

    When you run an install package that requires Admin access (invoke as
    admin), are the Current User registry keys for the admin? or the current
    normal user?

    Paul MacFarlane

  2. #2

    Default Re: Current User registry keys with Elevated Install

    Hi Paul,

    > When you run an install package that requires Admin access (invoke as
    > admin), are the Current User registry keys for the admin? or the current
    > normal user?

    If the install runs non-elevated (asInvoker) then it reads/writes the
    current-user profile. If it runs elevated (e.g. requireAdministrator) then
    it accesses the admins profile.

    Friedrich

  3. #3

    Default Re: Current User registry keys with Elevated Install

    Thank you !

    Paul MacFarlane

  4. #4

    Default Re: Current User registry keys with Elevated Install

    > Hi Paul,
    >
    >> When you run an install package that requires Admin access (invoke as
    >> admin), are the Current User registry keys for the admin? or the current
    >> normal user?
    >
    > If the install runs non-elevated (asInvoker) then it reads/writes the the
    > current-user profile. If it runs elevated (e.g. requireAdministrator) then
    > it accesses the admins profile.
    >
    > Friedrich

    As a follow up.....

    Why can't an 'asInvoker' install create any menu items or a desktop icon
    (shortcuts)?

    I need to load registry entries to the CU and create a shortcut.

    Paul MacFarlane

  5. #5

    Default Re: Current User registry keys with Elevated Install

    > Why can't an 'asInvoker' install create any menu items or a desktop icon
    > (shortcuts)?
    >
    > I need to load registry entries to the CU and create a shortcut.

    Paul,

    You should be able to do this by creating a small non-elevated "Helper.exe"
    in SetupBuilder (to do the work) and then use the SetupBuilder option at
    the end of your regular (elevated) install to RUN the helper program
    "non-elevated".

    That allows your SB install to run elevated and do all the things that a
    normal installer needs to do to meet Windows standards. But at the end of
    that install process your elevated installer launches your helper EXE to do
    the rest of the work under the current user profile.

    It's also worth mentioning that if your program saves any data or
    manipulates anything when it is first ran, that you should use the "RUN
    non-elevated" option on that as well.

    Otherwise you get into the scenario where "Paul the Administrator" installs
    the program and then RUNs it at the end of the install (which results in
    any data saved or Registry entries modified being saved in locations
    relative to "Paul the Administrator".

    Then the next time you run the program Windows runs it as "Paul the User"
    (unless the EXE is manifested to run "AsAdministrator" - resulting in a
    prompt to run the program elevated). Since the program (on all subsequent
    runs) is looking in data and Registry locations for "Paul the User", the
    initial settings stored or data saved where you ran the program at the end
    of an elevated install, the data stored by "Paul the Administrator" would
    appear to not exist.

    Windows is (as I am sure you know) VERY picky about permissions, elevation
    and data locations. So the only way to win the game is simply to play by
    the rules.

    Going forward Windows is only going to continue to get more and more
    secure. So issues like having a proper installer, having the programs
    manifested properly and code signed are going to continue to be the hoops
    we have to jump through in order to have them run successfully on the
    Windows platform.

    Anyway I hope this helps!

    Good luck on your projects!

    Charles

    --
    -------------------------------------------------------------------------------------------------------
    Charles Edmonds

    cjeByteMeSpammers@lansrad.com (remove the "ByteMeSpammers" to email me)

    www.learnh5fast.com - Master building web and mobile apps with Clarion H5!
    www.clarionproseries.com - ProDocument, ImageEx, ProScan, ProImage, ProPath
    and other Clarion developer tools!
    www.seal-soft.com - The xProduct Clarion templates - xWordCOM, xToolTip,
    xDataBackup Manager and more!
    www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
    www.setupcast.com - "A revolutionary new publishing system for software
    developers - enhanced for SetupBuilder users!"
    www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
    and Forms - Now with PNG support!
    www.fotokiss.com - "World's Best Auction Photo Editor"
    www.lansrad.com - "Intelligent Solutions for Universal Problems"
    -------------------------------------------------------------------------------------------------------

  6. #6

    Default Re: Current User registry keys with Elevated Install

    Thanks Charles.

    Per your advice I did use a small help setup (silent mode) to load
    registry settings and it's working great.

    I'm going to do a Friedrich suggested to get the Icons on the user
    desktop now.

    Paul MacFarlane

  7. #7

    Default Re: Current User registry keys with Elevated Install

    Hi Paul,

    > As a follow up.....
    >
    > Why can't an 'asInvoker' install create any menu items or a desktop icon
    > (shortcuts)?
    >
    > I need to load registry entries to the CU and create a shortcut.

    asInvoker apps create "per-user" items. So you have to switch your
    installer into "per-user" setup mode.

    http://www.lindersoft.com/forums/sho...flag#post91269

    Does this help?

    Friedrich

  8. #8

    Default Re: Current User registry keys with Elevated Install

    Perfect! Thanks.

    Paul MacFarlane

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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