What folder should a Single User app be installed in?


  1. Posts : 5
    Windows 7 32-bit
       #1

    What folder should a Single User app be installed in?


    I'm considering reconfiguring the installer for an application I develop. In the past, it allowed for All Users installs. If I want it to only be installed as a Single User, what user folder does best practices use as the install target? I can think of a few possibilities:

    c:\Users\UserName\My Documents\
    c:\Users\
    c:\Users\Program Files\

    Of course I'd have to have my installer created that last one on the above list.
      My Computer


  2. Posts : 2,468
    Windows 7 Ultimate x64
       #2

    While none of those really convinces me, I would think the best would be to use either %LOCALAPPDATA% or %APPDATA% environment variables as the base folder, which in particular in Windows 7 maps to c:\users\<username>\appdata\local and c:\users\<username>\appdata\roaming respectively. Creating a folder right there and dumping the program, and afterwards its data, there is not a bad option for a portable program. Alternatively, using %USERPROFILE% (c:\users\<username>) is possible.

    Installing to documents folder is not a good choice because that's a frequent place for user data, and extraneous folders there may get in the way while using another programs. Some programs (including MS ones) fall into that bad practice. The other two options are simply unacceptable, because users don't normally have write permissions there, unless the installer tampers with them, which is not recommended at all for built-in system locations.

    Any choice you made, just make sure to give the user a choice to change it to anything he wants, and remember to always use those environment variables, or even better API calls to retrieve those paths, don't hardcode them.
      My Computer


  3. Posts : 5
    Windows 7 32-bit
    Thread Starter
       #3

    What I ended up doing was using the following, at the suggestion made at the Inno Setup forum:

    %LOCALAPPDATA%\Programs

    So when the user runs the installer, they end up with

    <system volume>\users\<username>\appdata\local\Programs\MyProg\

    as the folder that houses the app. Inno Setup has a constant {userpf} that, when chosen as the default directory to install the app, places the app in

    <sytem volume>\users\<username>\appdata\local\Programs\

    In the case of this particular app, I do not want the user to change the install target, so I configured the install package to force the above on them.
      My Computer


  4. Posts : 37
    Windows 7 Ultimate 32 bit
       #4

    If your install is just a simple application install involving no global system changes then in your .iss file you should set the following value:

    PrivilegesRequired=lowest

    This will have the effect of bypassing the UAC privilege escalation prompt (on protected systems) that accompanies almost every installation, even though half the time administrative access is not required.

    You might also want to include on your download page, instructions on how to "Unblock" the install program after downloading it (another idiotic default).

    It is not in anyone's interest to have users getting into the habit of granting special permission every time they install a program. It renders the security system ineffective when a real threat comes along.
    Last edited by alacarre; 22 Nov 2013 at 10:23. Reason: Edited to add:
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:57.
Find Us