[SOLVED] How do I change the default installation path?

You have trouble using InstallForge? Then this is the right place for you.
Post Reply
Posts: 11
Joined: 29 May 2023, 03:33

Hi all,

I have a 64-bit, Windows 11 Pro laptop. I wrote an application in python (using PyQt6) that has close to 500 data files. The app includes an integrated editor to modify the data files, so being able to read and write to the files is central to the application's function. I bundled everything up using pyinstaller, then used InstallForge to bundle everything into a nice, tidy installation utility.


When the setup utility created by InstallFoge ran, the application seemed to install just fine. But it wasn't long until I discovered that the application couldn't write to the data files unless the app was launched from Admin level -a level of access many of my perspective users couldn't (and shouldn't) have. With the help of other users in the InstallForge community, it was discovered that the reason behind this issue is that the application is installed, by default, to C:\Program Files (x86)\, a location where Windows demands Admin-level permission to change. The solution would be to change the default installation path.

Question: How can we change the default path to a folder in a location not covered by the same Admin requirement as C:\Program Files (x86)\ ?
Last edited by Science1 on 10 Jun 2023, 04:00, edited 1 time in total.
Posts: 11
Joined: 29 May 2023, 03:33


First a disclaimer. I program as a hobby, mostly in Python, and I am new to InstallForge so use my advice at your own risk. I will gladly defer to anyone with more experience who has suggestions or corrections to anything that I say.

I found a brief post on this from binet in the Tutorial section of the InstallForge website:
I would like to go a little more in depth.

At the bottom of the 'Files' page of the InstallForge utility, look for a field entitled 'Default Installation Path'.

Enter the following: <UserProfile>\<AppName>\

The items between the back-slashes are InstallForge constants. Installforge plugs things into those tokens to form the default path. When InstallForge sees '<UserProfile>', it replaces that with C:\Users\username, and when it sees <AppName>, it replaces it with a folder having the name of your application. On my system, this creates the path 'C:\Users\science\Periodic_Table\', and installs the application there.

If you want your app folder placed in a 'Company' folder, in the way most main-stream software is installed, you could use: <UserProfile>\<Company>\<AppName>\

If you want to hard-wire a folder into the path, you can use: <UserProfile>\Programs\<AppName>\
But be careful. If the 'Programs' folder is not found, InstallForge will not create it for you and the installation attempt will fail, so you should probably stay with folders that you know are on all Windows systems. (Or look into 'Custom Commands'.)

There are other constants that you can use, as listed in the docs: https://installforge.net/docs/how-tos/u ... constants/

Windows users beware; many of them default to the C:\Program Files (x86)\ location that caused me so much trouble. You should probably avoid any path that has 'Windows' in it, or that installs to a system location such as (x86) or (x32).

If you need something more than the few remaining constants can provide, this page in the docs on creating Custom Variables and Custom Commands seemed very promising.
https://installforge.net/docs/how-tos/u ... onstants_1
https://installforge.net/docs/how-tos/u ... onstants_1

And you can always ask for help on the InstallForge Community website.

I hope this helps. Cheers!

Last edited by Science1 on 10 Jun 2023, 04:41, edited 1 time in total.
User avatar
Posts: 13
Joined: 30 May 2023, 18:56

Hello Science1,

thanks a lot for your valuable contributions; much appreciated.

It seems that you like to write tutorials. Maybe you should ping Soner and ask him to contribute to the official docs. ;)
InstallForge Power User
Posts: 11
Joined: 29 May 2023, 03:33

Thank you for the kind comments, markbell.

Soer is more than welcome to draw on, use, or modify anything that I post here, for the documentation. Cheers!

Posts: 3
Joined: 17 Feb 2024, 10:54

I have questain
1. i need to execute step by stem .msi .msp .exe I am making install with install forge how should I can achieve this that after running installer made by install forge can run .msi first when it fininst run .msp when it finish run .exe as admin then exit
Post Reply