/build/static/layout/Breadcrumb_cap_w.png

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...

0 Comments   [ + ] Show comments

Answers (5)

Posted by: VikingLoki 19 years ago
Second Degree Brown Belt
0
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.
Posted by: Neo64fr 19 years ago
Senior Yellow Belt
0
The problem is when you have two or more database to install.

The folder structure has to be like this:
c:\program files\my app\db1
c:\program files\my app\db2

In this case setting a property is not enough and dont work.
Posted by: VikingLoki 19 years ago
Second Degree Brown Belt
0
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.
Posted by: Neo64fr 19 years ago
Senior Yellow Belt
0
Yes, i thought but i can't use this method because my client only accept one mst to do that.
the only method i can use is via one mst, add the name of the database(s).
i search a method with or without a scripting. i only can use vbs for scripts
Posted by: VikingLoki 19 years ago
Second Degree Brown Belt
0
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.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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