+ Reply to Thread
Results 1 to 2 of 2

Thread: How Do I Create Script for All Users vs Single User

  1. #1
    Join Date
    Jan 2011
    Location
    Livingston, TX
    Posts
    11

    Thumbs up How Do I Create Script for All Users vs Single User

    Hello,I created a Custom Dialog With 2 Radio Buttons. One for All Users and the other for a single User. What Script language do I need to make a single User Install or All User Install based on the options. Does anyone have a code example?. Also If the Install is for all Users how do you program the logic to allow all users access to shortcuts? Where does this code go after the file Install procedure or before?
    Robert
    Last edited by crmfghtr; 02-09-2011 at 12:19 PM. Reason: Resolved

  2. #2
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: How Do I Create Script for All Users vs Single User

    Robert,

    This is a thing from the past and can't be done in modern UAC-aware operating systems (Windows Vista, Windows Server 2008, Windows 7 and Windows 2008 R2) any longer! The application requests an execution level before the application is started. Installations should be machine-wide today.

    The following is a very brief description of how to make an application "UAC-aware"

    -- Standard Application:

    1. Embed an UAC manifest into your main application (.EXE). A manifest basically tells Windows how aware the program is about the recent Windows versions (and disables "Virtualization"). You should include a manifest for Windows 7 (it's fully backward compatible with all previous Windows versions).

    SetupBuilder 7 Developer Edition can embed such a manifest into your executable.

    2. Request "asInvoker" execution level privileges through the manifest for your application.

    3. Code-sign all your application files (e.g. .EXE, .DLL). SetupBuilder 7 Developer Edition can handle this for you.

    4. Your application should not depend on any administrative APIs.

    5. Do not write per-user information or user-writable information to Program Files or Program directories.

    6. Do not write to any other protected Windows area (e.g. the OS drive root folder, the "Windows" folder tree, etc.).

    7. Do not write to the HKEY_LOCAL_MACHINE or any other protected registry key.


    -- Standard Installation:

    1. Use an UAC-aware installation system. By default, installations run elevated.

    2. Install applications per-machine (all users) and store per-user data in different locations.

    3. Do not install Quick Launch shortcuts.

    4. Never write to per-user locations from the elevated running installer. That means, never write to the HKEY_CURRENT_USER registry key or to per-user file locations.

    5. Launch applications non-elevated at the end of the installation process.

    6. Code-sign the installer.

    Note: if you have to install "per-user" data, install it to a common location and as a "first run" action of your main application, copy the data from the common location into a per-user location.

    Respect the recommended (default) locations for applications and data files, but provide users with an option to select another installation location for both. A true "Mixed User Application" should work elevated and non-elevated.

    Does this help?

    Friedrich

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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