Software Question

Change default installation path in msi setup

05/10/2016 17515 views
Dear Experts

I have a msi set up which i need to install it's installation files in C:\Company Name\Product Name currently it is installing in C:\Program Files\Company Name\Product Name. Moreover I am not able to set path manually as browse button is disabled. I searched on many forums but can not find appropriate answer please help
2 Comments   [ + ] Show comments


  • Have you tried opening the .msi using orca or a similar utility and seeing if the path can be modified?
  • Yes I opened file in Orca but how to set pat?
    • Now that I look through some of my .msis, I can't find a way to modify the install path with orca. I assumed that would be an option but can't find it.

Community Chosen Answer


You can do this from the command line:

MSIExec /i [path_to_and_name_of_MSI] INSTALLDIR="[required_installation_folder_goes here]" [other arguments]

INSTALLDIR must be in all upper-case and its value enclosed in quote marks.

You are advised to add verbose logging to the command line, otherwise troubleshooting will be...challenging.

Answered 05/10/2016 by: VBScab
Red Belt

  • Users will install app themselves so I need that it will be done through installer (gui)
    • Make a batch file in the same location as the msi.

      In the batch file use the command below.

      msiexec /i NameOfYourInstaller.msi INSTALLDIR="C:\Whaterever\FolderPath" /qb

      All users would need to do is dbl click the batch to install.
      • I received following error after creating batch file and execute program through batch file.
        "Error while writing to C:\Program Files\Company Name\Product Name\core.dll.
        Make sure you have access to the directory"
      • Right click, run as admin on the batch.

All Answers

Check the PROPERTY Table, as you might be able to set it in this location.

You can modify this via the DIRECTORY Table, but you need to know what you are doing if you messing around with the tables.

Answered 05/10/2016 by: rileyz
Red Belt

  • What need to be change in PROPERTY table and DIRECTORY table. Please help
    • Your best to try VBSCabs method before mine. His tip is the best method to achieve your outcome.
      • What need to be change in PROPERTY table and DIRECTORY table

>I received following error after creating batch file and
>execute program through batch file.
>"Error while writing to C:\Program Files\Company Name\
>Product Name\core.dll.
>Make sure you have access to the directory"

I was just about to post an answer along the lines of "So your users have rights to install software? Best of luck with that!" Then I saw the above which would imply that your users DO NOT have those rights, which is absolutely as it should be.

Install using an account which has admin-level privileges.

Answered 05/11/2016 by: VBScab
Red Belt

  • @VBScab
    my requirement is to make sure that user will install
    app with admin privileges. So to make it installer that it will not require admin level privileges I made some changes in Directory and Custom action table which are below
    In Custom action table property Set_installDir was set to [%Program Files]\[Manufacturer]\[ProductCompact] Now it is set to "[%Company Name]\[Manufacturer]\[ProductCompact]"
    In Directory property ProgramFilesFolder set to .:PROGRA~1|program files Now I set it to .:Company Name" Please help

So do your target machines have an environment variable named CompanyName which has a value assigned to it? That's what "[%CompanyName]" is resolved to: the content of an environment variable 'CompanyName'.

>Now I set it to .:Company Name" Please help
So basically - no offence - you have no clue what you're doing. I'm willing to bet you're doing this directly to the MSI, too, rather than via a transform.

Honestly, with the hoops you're jumping through - or, more correctly, trying to jump through - you'd be better off deploying the app properly, using either a dedicated installing account or the local System account.

Answered 05/11/2016 by: VBScab
Red Belt

Why do you want/need users to be able to install this software or, indeed, any software? With anything beyond XP, this route is fraught with all sorts of hurdles and this will not be a unique experience.
Answered 05/11/2016 by: VBScab
Red Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


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