Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: What folder should a Single User app be installed in?

24 Oct 2013   #1

Windows 7 32-bit
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\Program Files\

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

My System SpecsSystem Spec
25 Oct 2013   #2

Windows 7 Ultimate x64

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 System SpecsSystem Spec
25 Oct 2013   #3

Windows 7 32-bit

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


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 System SpecsSystem Spec
22 Nov 2013   #4

Windows 7 Ultimate 32 bit

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:


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.
My System SpecsSystem Spec

 What folder should a Single User app be installed in?

Thread Tools

Similar help and support threads for2: What folder should a Single User app be installed in?
Thread Forum
User Profile Folder - Change User Account Folder Name Tutorials
Solved Bulk Change All Folder Icons in Single Folder or Folder Type Customization
Solved Have to select user upon startup, and after locking. Single User General Discussion
User Profile folder - static folder instead of created by user signon Installation & Setup
Solved Windows seven installed on a single partition? Installation & Setup

Our Sites

Site Links

About Us

Find 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 12:13 AM.
Twitter Facebook Google+

Windows 7 Forums

Seven Forums Android App Seven Forums IOS App