MSI installer change default install location.

OK, not sure if you can help me.

Using windows 11 (Even though windows 10 and 11 say they will run everything previous versions do, which, technically they can, that does not mean they will allow you to install it unless you upgrade from a previous version of windows that had it isntalled previously due to microsoft lack of support and security etc).

So, my dilemma, Windows 11 will not run some installers claiming the installers have been superceeded, but you can install them using the msiexec command.

As I use the PC for work and personal family things i'd like to keep the apps and games played by the kids seperate.

So, for example, for me, msiexec /i "installer.msi" /qb will install to the default folder in program files (x86), which is fine for apps, but, for games and other non work related software I like to keep them seperate.

I.e. c:\program files (x86)\games\ for kids games and c:\program files (x86)\Nonworkapps\ (These are also the default restore locations for all my app settings backups which saves me re installing for days)

Using msiexec /i "installer.msi" INSTALLDIR="c:\program files (x86)\games\" /qb    and     msiexec /i "installer.msi" TARGETDIR="c:\program files (x86)\games\" /qb just extracts the program files to the games folder (sometimes, sometimes it just defaults to installing to program files again).

What switches do I need to make the installer default location to c:\program files (x86)\games\ then create the end folder  so it resembles c:\program files\games\gamename (not c:\program files\games\program company\gamename). Having to type and match the app name folder with backups will be a phenominal pain in the butt

I have tried Progdir and  applicationfolder

Any help greatly appreciated

0 Comments   [ + ] Show comments

Answers (1)

Posted by: Hobbsy 1 month ago
Red Belt

These are all the options that MsiExec.exe provide the user

msiexec /Option <Required Parameter> [Optional Parameter]

Install Options

 </package | /i> <Product.msi>

 Installs or configures a product

 /a <Product.msi>

 Administrative install - Installs a product on the network

 /j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]

 Advertises a product - m to all users, u to current user

 </uninstall | /x> <Product.msi | ProductCode>

 Uninstalls the product

Display Options


 Quiet mode, no user interaction


 Unattended mode - progress bar only


 Sets user interface level

 n - No UI

 b - Basic UI

 r - Reduced UI

 f - Full UI (default)


 Help information

Restart Options


 Do not restart after the installation is complete


 Prompts the user for restart if necessary


 Always restart the computer after installation

Logging Options

 /l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>

 i - Status messages

 w - Nonfatal warnings

 e - All error messages

 a - Start-up of actions

 r - Action-specific records

 u - User requests

 c - Initial UI parameters

 m - Out-of-memory or fatal exit information

 o - Out-of-disk-space messages

 p - Terminal properties

 v - Verbose output

 x - Extra debugging information

 + - Append to existing log file

 ! - Flush each line to the log

 * - Log all information, except for v and x options

 /log <LogFile>

 Equivalent of /l* <LogFile>

Update Options

 /update <Update1.msp>[;Update2.msp]

 Applies update(s)

 /uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi | ProductCode>

 Remove update(s) for a product

Repair Options

 /f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>

 Repairs a product

 p - only if file is missing

 o - if file is missing or an older version is installed (default)

 e - if file is missing or an equal or older version is installed

 d - if file is missing or a different version is installed

 c - if file is missing or checksum does not match the calculated value

 a - forces all files to be reinstalled

 u - all required user-specific registry entries (default)

 m - all required computer-specific registry entries (default)

 s - all existing shortcuts (default)

 v - runs from source and recaches local package

Setting Public Properties


I cannot see in that list any option that provides the user the opportunity to define which directory the application is installed in, so my only thought would be to create a directory for the application, copy the installation files into that directory and run the installation to see if it installs in the directory, other than that, you may be looking for "Hens' Teeth".

This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ