CiscoIPPhone
CiscoIPPhone

Reputation: 9477

Where should executable files be installed to in Windows 7?

I'm currently working on my applications installer and I'm wondering where the executable files should be installed to in Windows 7.

If I'm installing as admin my executables files get put in C:\Program Files.

If I install my product as a normal user where should the executables be put?

Thanks in advance.

Upvotes: 0

Views: 637

Answers (4)

Kate Gregory
Kate Gregory

Reputation: 18954

The executables should be under Program Files, who's precise location may vary from installation to installation. This means that the setup should run elevated. If InnoSetup makes .msi files, they will request elevation. If it makes a file called setup.exe, it will also request elevation. If for some reason the exe has a different name, like GetStarted.exe, then you should hand create an external manifest (GetStarted.exe.manifest) and put in requireAdministrator for the requestedExecutionLevel which will ensure your installer requests elevation.

Regardless of how it requests elevation, if the user doing the install is an admin (eg you) they will just have to click consent. If they are not an admin they will need to get an admin to consent for them. After that the installer will be able to write to Program Files.

If it's important to you that non admins be able to install the app then have the executables go under the users profile - but that would not be my first choice. The protection given to Program Files means that users are less likely to find themselves with messed up copies of your application if you install it to the protected area.

Upvotes: 1

Serplat
Serplat

Reputation: 4447

You should probably store that in the AppData directry, as I saw you mention in reply to @ChrisF. Remember that the user can move this directory though, so I wouldn't point to it explicitly. There is an environment variable that you can grab, that only applies to the logged-in user, which is %AppData%.

Keep in mind that putting it in %AppData%/Roaming would follow the user across multiple machines on the same Domain and %AppData%/Local would just stay on the one machine.

Upvotes: 1

ChrisF
ChrisF

Reputation: 137148

Put the files in the user folder.

This will mean that the application is only available to that user.

Upvotes: 2

ajay_whiz
ajay_whiz

Reputation: 17931

Which installer are you using?

MSI runs in elevated privileges. You can install your application in program files folder

Upvotes: 2

Related Questions