Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have used custom action dlls very successfully to do what you are talking about.</p> <p>If you google this you'll find many hits, one such example of how these work is <a href="http://ronniediaz.com/2011/06/20/c-create-a-windows-installer-class-custom-action-bootstrap-dll-in-net/" rel="nofollow">here</a> (seems to be quite decent in terms of showing you the structure).</p> <p>The code inside your dll is just c#, so it can do pretty much anything you want it to do, dynamically writing to config files etc. You may have limitations, however, based upon the privileges of the account running the setup - for example most "user" accounts would not be able to write to c:\program files..... - which is why a lot of setup programs require to be run as an administrator.</p> <p>Using the VS Setup project settings you can pass information from the setup into the Dll (note the inbound parameter on the Install override), although the amount of data you can pass is limited. I have typically passed in the install folder (so my dll knows where the files are to modify) and an "environment" setting, also usernames passwords etc., so I know what database to hit (and using what account to hit it), what account to run such-and-such a service under, etc. These can be captured through the limited range of dialogs you can introduce into the setup project itself.</p> <p>This approach also meant that during development we did not have to worry too much about values in config files, since we knew they would be set properly during install. And especially with usernames and passwords, it meant that the developer didn't need to know them (the operator performing the install was the only person who know them) which was nice from a security perspective.</p> <p>Note finally that there is also a hook here for uninstalls, so potentially if you need to undo something, there's a place to do it.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload