Installer Class Question

S

S Chapman

How to get the folder in which the MSI is present?

What I am trying to do is, basically my app has a config file and
within this the connection string is stored, when I distribute the
MSI, the sys-admin normally puts the MSI on a network and installs the
clients from there. I want to put a copy of cofnig file in the same
folder as the MSI which the sys-admin can edit and speicify the right
connection string and inside my installer class I will copy this
edited config file into the app folder. For this I need to know where
the MSI is running from.

How to get the MSI folder please?

Thanks
 
N

nologo

How to get the folder in which the MSI is present?

What I am trying to do is, basically my app has a config file and
within this the connection string is stored, when I distribute the
MSI, the sys-admin normally puts the MSI on a network and installs the
clients from there. I want to put a copy of cofnig file in the same
folder as the MSI which the sys-admin can edit and speicify the right
connection string and inside my installer class I will copy this
edited config file into the app folder. For this I need to know where
the MSI is running from.

How to get the MSI folder please?

Thanks

hello, it appears your going around the process incorrectly.
ok, i apologise for my ignorance in advance:
- in solution Explorer, right click on your project name, Add New
Project, select Installer setup.
- in applications Folder, right click and Add > Project Output
this should include the config file you've created, if not, simply,
right click, Add File > and browse to the config file you wish to
include in your installer msi
 
S

S Chapman

Thanks for your response.

The problem is the connection string varies from customer to customer
and needs changing by the sys-admin before installing. Currently my
MSI includes the app.config file but this always has the connection
string that was valid at the time of development. I hope you get the
picture. The MSI is being shipped to diff customers/offices. Thanks
 
N

nologo

Thanks for your response.

The problem is the connection string varies from customer to customer
and needs changing by the sys-admin before installing. Currently my
MSI includes the app.config file but this always has the connection
string that was valid at the time of development. I hope you get the
picture. The MSI is being shipped to diff customers/offices. Thanks

Well a few ideas, if your sending it to customers with a different
config file each time, you don't want the customer having to manually
dump a config file into a file location on the hard-drive. So you
could create a KIX file which would firstly call the msi and install
it, then move the config file into the correct location. (you could
also do this with a batch file OR tweak the installer ini file)
When you create an applications msi, it goes into the location where-
ever you create and save it.
for example, i think the default is: "My Documents\Setup\Release
but again, when you create the project setup, you can specifiy the
location of where the msi will be saved to on your computer.
on another note: <APPLICATION NAME>\bin\Debug is where your config
should reside while running from VS
 
S

S Chapman

Thanks,

Batch file looks like a good idea but how can you obtain the folder
where the app was installed? The sys-admin could install app on diff
drives/folders depending on the company policy so we can't assume a
fixed target folder to copy across the config file. Any ideas? Thanks
 
F

Family Tree Mike

If you bundle an example file as loose (PackageAs = vsdpaLoose) it will still
be installed to the target dir. It will also be available to the admin
person to edit prior to install. Your install should not need a custom
action for this. Does this accomplish what you want? Hopefully I am
understanding your goal.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top