Change default installation path in msi setup
-
Have you tried opening the .msi using orca or a similar utility and seeing if the path can be modified? - rockhead44 8 years ago
-
Yes I opened file in Orca but how to set pat? - philipadi 8 years ago
-
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. - rockhead44 8 years ago
Answers (5)
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.
Comments:
-
Users will install app themselves so I need that it will be done through installer (gui) - philipadi 8 years ago
-
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. - rileyz 8 years ago
Comments:
-
What need to be change in PROPERTY table and DIRECTORY table. Please help - philipadi 8 years ago
>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.
Comments:
-
@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 - philipadi 8 years ago
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.