Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yes, it can be done with following steps: 1- write your required functionality in c# installer class (make sure your are using installer class)</p> <p>2- Compile and add your dll into installshield (recomended create a separate component for this dll) 3- Select component view -> select above component and go to .Net settings section, set the ".Net Installer class" to true. Set the ".net installer class parameters"</p> <p>Parameters are passed as key/value pair e.g </p> <pre><code>/targetDirectory="[INSTALLDIR]\" </code></pre> <p>All steps are same, just added screenshots.</p> <ul> <li>Create a dll with an installer class and your encrypt/decrypt class.</li> <li>Add dll and config file to component(above mentioned), if config file is already added to some other component then its fine. no need to add again.</li> <li><p>I have added and retrieved INSTALLDIR variable as argument which is predefined. if you want to receive some input from user (from some custom textboxes) then you will need to define your own variables to store and pass values as arguments.</p></li> <li><p>Creating dll with installer class and your requred logic for other task <img src="https://i.stack.imgur.com/MbSD9.png" alt="Installer class"></p></li> <li>Creating component and adding files<img src="https://i.stack.imgur.com/6Lnbw.png" alt="component with installer class and dependencies"></li> <li>Mark the dll as installer class and pass arguments <img src="https://i.stack.imgur.com/1k9fC.png" alt="Passing arguments"></li> </ul> <p>Here goes installer class:</p> <pre><code>using System; using System.Text; using System.IO; using System.Diagnostics; using System.ComponentModel; using System.Configuration.Install; using System.Collections.Generic; namespace EncryptionDecryption { [RunInstaller(true)] public class InstallerClassDemo : Installer { private string installationDirectory=string.Empty; private string testString=string.Empty ; public override void Install(System.Collections.IDictionary stateSaver) { base.Install(stateSaver); try { //For testing purpose only.. work only in debug mode when pdb files are deployed as well. //Debugger.Break(); installationDirectory = Context.Parameters["INSTALLDIR"]; //I believe, the config file must be located in the installation directory if so, then use the following way to compute path string configFilePath = Path.Combine(installationDirectory, "myConfigFile.config"); EncrptionHelper.SetValue(configFilePath, "testKey", "testValue"); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.Message); } } protected override void OnCommitted(System.Collections.IDictionary savedState) { base.OnCommitted(savedState); } public override void Uninstall(System.Collections.IDictionary savedState) { base.Uninstall(savedState); } } } </code></pre>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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