cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

command required to give the folder location of our choice

I am installing the application thru command line with the below emntioned command.

msiexec /i /qb!

this is able to make a silent install. When installing the default location where the files related to the application are stored under C:\Program Files\Application Name folder.

I wanted to know if is there any way to change the default folder location to any other folder which we can specify.

For this i tried through the commad line as
msiexec /qb! /i INSTALLDIR="C:\xyz" then only some are copied to the xyz folder and some are copied to the applicationname folder. I want everything to be copied to the xyz folder which i mentioned.

I want this to be don only through command line. Can I get the solution for this ASAP.

Thanks in advance
(11) Replies
You will have to look into Directory table and make sure the folders where files are installed to reference INSTALLDIR. It's not easy to explain everything clearly in a couple of words. You should familiarize yourself with Directory table.
Amalar,

This may not be as tricky as you'd think. The problem that you're seeing is that the developer used two properties to install files to the destination. It sounds like you've found one with INSTALLDIR. The next step is to find the second. Once you know the second you'd pass it on the command line just like you did with INSTALLDIR.

So how to find the second? The easiest way is enable logging on the command line (/L*v C:\msilog.txt). Once the install is run, open the log file and go to the very end. This is a property dump by Windows Installer. Every property that is used by the package *and* it's current value is listed. Search through these properties and find the the other path (or paths). Try these on the command line and you should be good to go.

There could be some other things going on, but this should get you started.

Cheers,
As per leslie's suggestions i tried running the /L*v C:\msilog.txt and msi.log is obtained. It gives information about
Property(S): APPCODE = 46
Property(S): MSGS = 1
Property(S): SourceList = C:\Packages
Property(S): SecureCustomProperties = INSTALLDIR;MSGS;APPCODE;ALLUSERS;SOURCELIST
Property(S): ARPINSTALLLOCATION = C:\adobedemoexample\
Property(S): ProductState = -1
Property(S): PackageCode = {79F355CA-BD64-4A92-A5E7-5448A7CCB5A4}
Property(S): COMPANYNAME = Virgin Media
Property(S): USERNAME = Any Authorised User
Fromt his information what paths can be found to install all the files in the user specified folder. Leslie it would be greatful if u can help me out in this.

Thanks in advance.
I don't see any property that copies the files to the default destination versus the path that you're provided. Are there other entries within the log file that aren't shown here? You may want to search on the default destination and see what you come up with.
ARPINSTALLLOCATION = C:\adobedemoexample\

This is the property which specifies the user specified location. I want everything to be copied to the above mentioned folder. But only a few are getting copied to it. (those that are pointing to installdir)

I even tried

msiexec /a SHORTCUTFILENAME=TRUE TARGETDIR="C:\xyz" /qb!

but when i do this the shortcuts are not seen in the start\programfiles menu. And also i cannot do a silent uninstall. But all the files related to the application are stored only under C:\xyz which is specified by the user. This also doesnot help. Please suggest :confused:

Thanks and regards
ARPINSTALLLOCATION = C:\adobedemoexample\

This is the property which specifies the user specified location. I want everything to be copied to the above mentioned folder. But only a few are getting copied to it. (those that are pointing to installdir)

I even tried

msiexec /a SHORTCUTFILENAME=TRUE TARGETDIR="C:\xyz" /qb!

but when i do this the shortcuts are not seen in the start\programfiles menu. And also i cannot do a silent uninstall. But all the files related to the application are stored only under C:\xyz which is specified by the user. This also doesnot help. Please suggest

Thanks and regards
I appreciate your patience through this. It's turning out not to be as simple as I thought. I think I'm also making some assumptions about your package. If you don't mind, can you answer these questions for me?

1. Did you repackage this application or is this a vendor .msi?
2. If vendor, what is the product name?
3. If vendor, did you extract the .msi out of an executable?
4. I assume you tried this initially, but want to be sure:

msiexec /i /qbn /L*v c:\msilog.txt INSTALLDIR=C:\xyz

If not, would you mind giving it a whirl?

5. If you have Orca or a log file handy, are these files being installed through a merge module? Do the files exist within Orca (use the File table)?
6. Pick one of the files that are not installing like you expect, using Orca look in the File table for the Filename (be sure to use the Filename column) note the component name. Look in the Component table for the component name--what's the value under the Directory column?

Thanks!
I have repackaged the application as we have got the setup.exe for the application. I donot have orca .
Orca is available with the Windows Installer SDK from Microsoft. No worries. You can do the same thing with InstallShield Editor.

Go to Additional Tools (at the bottom of the left pane) and select Direct Editor. Go to the File table and look for one of the files that's causing the problem. Look under the Component column for the component name. Then go to the Component table and find the component name. Look under the Directory column. What is the directory name?
under the directory table not all the files are pointing to the INSTALLDIR. Only a few are pointing to the INSTALLDIR. Others are pointing to the other folders like TARGETDIR, PorgramFilesFolder etc. This was observed long back. Is it possible to change all of them to INSTALLDIR. Can we do it, if done will it not effect the registry or the msi in anyway. But even if possbile to be done i dont want to do that since I only want to specify teh file location at command prompt. Please advice .............. :confused:



Thanks and regards
Changing all of the component destinations would make a mess of things. However in the component table you can see the destination property for the files that you do want to relocate. Using the File and Component table you should be able to figure out which property to add to the command line (in addition to INSTALLDIR).