Installing files in different folders depending on parameter.mst
The application i try to package is a client/server application.
It can connect to one or more database.
In order to work properly, it need to install the exe file and some other files in a folder named like the database it has to connect. To be accepted by my client, the name of the database(s) must be set in a Parameter.mst
I dont know how to do that. If somebody can help me...
It can connect to one or more database.
In order to work properly, it need to install the exe file and some other files in a folder named like the database it has to connect. To be accepted by my client, the name of the database(s) must be set in a Parameter.mst
I dont know how to do that. If somebody can help me...
0 Comments
[ + ] Show comments
Answers (5)
Please log in to answer
Posted by:
VikingLoki
19 years ago
Hmmm. This is really best done with a simple property, not a full transform. But you can always make a transform that contains only the additional property value if they really want it.
Create a property called [DATABASENAME], populate it with a default database name. Do everything you need to do, (create a dir, put the .exe in it, etc) and put [DATABASENAME] wherever the database name would go. For example, set the directory to C:\Program Files\MyApp\[DATABASENAME]. (or wherever you want it to go)
That way, all that's really necessary to point it to another database is to give it a command line:
MSIEXEC /i App.msi DATABASENAME="NameOfDatabase"
If they really want a transform, then make a transform that contains only 1 entry in the Properties table. That entry being [DATABASENAME] set to the value of "NameOfDatabase".
Hope that helps.
Create a property called [DATABASENAME], populate it with a default database name. Do everything you need to do, (create a dir, put the .exe in it, etc) and put [DATABASENAME] wherever the database name would go. For example, set the directory to C:\Program Files\MyApp\[DATABASENAME]. (or wherever you want it to go)
That way, all that's really necessary to point it to another database is to give it a command line:
MSIEXEC /i App.msi DATABASENAME="NameOfDatabase"
If they really want a transform, then make a transform that contains only 1 entry in the Properties table. That entry being [DATABASENAME] set to the value of "NameOfDatabase".
Hope that helps.
Posted by:
Neo64fr
19 years ago
Posted by:
VikingLoki
19 years ago
Ah... I see.
It's possible to have combinations too. Well, in that case, if it's just a unique dir with some files in it added on for each DB, then you can use the fact that you are not limited to one transform. You can make a transform for each database connection you need to add, which includes whatever files/dir that you need. i.e. create a MyApp.AddDB1.mst, MyApp.AddDB2.mst, MyApp.AddDB3.mst...
Then on the command line, you can tack on whatever database(s) you want. For example...
MSIEXEC /i MyApp.MSI TRANSFORMS="MyApp.AddDB2.mst" or
MSIEXEC /i MyApp.MSI TRANSFORMS="MyApp.AddDB1.mst; MyApp.AddDB3.mst"
MSIEXEC /i MyApp.MSI TRANSFORMS="MyApp.AddDB1.mst; MyApp.AddDB2.mst; MyApp.AddDB3.mst"
Etc...
Now if each MST is going to have to update a single file (.INI's excluded) or reg key, then this won't work. You'll need to get more creative if that's the case, but we'll burn that bridge if we get to it.
It's possible to have combinations too. Well, in that case, if it's just a unique dir with some files in it added on for each DB, then you can use the fact that you are not limited to one transform. You can make a transform for each database connection you need to add, which includes whatever files/dir that you need. i.e. create a MyApp.AddDB1.mst, MyApp.AddDB2.mst, MyApp.AddDB3.mst...
Then on the command line, you can tack on whatever database(s) you want. For example...
MSIEXEC /i MyApp.MSI TRANSFORMS="MyApp.AddDB2.mst" or
MSIEXEC /i MyApp.MSI TRANSFORMS="MyApp.AddDB1.mst; MyApp.AddDB3.mst"
MSIEXEC /i MyApp.MSI TRANSFORMS="MyApp.AddDB1.mst; MyApp.AddDB2.mst; MyApp.AddDB3.mst"
Etc...
Now if each MST is going to have to update a single file (.INI's excluded) or reg key, then this won't work. You'll need to get more creative if that's the case, but we'll burn that bridge if we get to it.
Posted by:
Neo64fr
19 years ago
Posted by:
VikingLoki
19 years ago
Yeah, definitely post your EXACTLY what restrictions you're under.
- Are you required to have only 1 MSI for the app, or can you have several depending on what config is desired?
- You say "Use only 1 transform", does that mean you can choose among several transofrms, only applying 1 transform during install, or have only 1 transform for the application period.
- Are you permitted to assign property values in the command line?
i.e. MSIEXEC /i MyApp.MSI TRANSFORMS="MyApp.mst" INSTALLDB1=1 INSTALLDB2=0 INSTALLDB3=1
- How will the MSI be distributed?
- Is it Automatic or Manual, Silent or Visible?
I hope you don't end up saying the client wants a transform for every possible combination of databases, if you you will want to talk them out of it. If you have 5 databases, and you need to create a transform for each possible combination of what DB is or is not installed, you'll be building 32 MSTs! 10 databases and you're talking 1024 MSTs. That's rediculous.
- Are you required to have only 1 MSI for the app, or can you have several depending on what config is desired?
- You say "Use only 1 transform", does that mean you can choose among several transofrms, only applying 1 transform during install, or have only 1 transform for the application period.
- Are you permitted to assign property values in the command line?
i.e. MSIEXEC /i MyApp.MSI TRANSFORMS="MyApp.mst" INSTALLDB1=1 INSTALLDB2=0 INSTALLDB3=1
- How will the MSI be distributed?
- Is it Automatic or Manual, Silent or Visible?
I hope you don't end up saying the client wants a transform for every possible combination of databases, if you you will want to talk them out of it. If you have 5 databases, and you need to create a transform for each possible combination of what DB is or is not installed, you'll be building 32 MSTs! 10 databases and you're talking 1024 MSTs. That's rediculous.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.