/// <summary> /// Initializes a new instance of the <see cref="ElevatedManagedAction"/> class with properties/fields initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="ElevatedManagedAction"/> instance.</param> /// <param name="name">Name of the CustomAction. The name should match the method implementing the custom action functionality.</param> public ElevatedManagedAction(Id id, string name) : base(id, name) { Impersonate = false; Execute = Execute.deferred; UsesProperties = "INSTALLDIR"; }
/// <summary> /// Initializes a new instance of the <see cref="BinaryFileAction"/> class with properties/fields initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="BinaryFileAction"/> instance.</param> /// <param name="key">The key (file name) of the installed file to be executed.</param> /// <param name="args">The arguments to be passed to the file during the execution.</param> public BinaryFileAction(Id id, string key, string args) : base(id) { Key = key; Args = args; Name = "Action" + (++count) + "_" + key; Step = Step.InstallExecute; }
/// <summary> /// Executes a new instance of the <see cref="QtCmdLineAction"/> class with properties/fields initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="QtCmdLineAction"/> instance.</param> /// <param name="appPath">Path to the application to be executed. This can be a file name only if the location of the application is well-known.</param> /// <param name="args">The arguments to be passed to the application during the execution.</param> /// <param name="returnType">The return type of the action.</param> /// <param name="when"><see cref="T:WixSharp.When"/> the action should be executed with respect to the <paramref name="step"/> parameter.</param> /// <param name="step"><see cref="T:WixSharp.Step"/> the action should be executed before/after during the installation.</param> /// <param name="condition">The launch condition for the <see cref="QtCmdLineAction"/>.</param> /// <param name="sequence">The MSI sequence the action belongs to.</param> public QtCmdLineAction(Id id, string appPath, string args, Return returnType, When when, Step step, Condition condition, Sequence sequence) : base(id, returnType, when, step, condition, sequence) { AppPath = appPath; Args = args; Name = "Action" + (++count) + "_QtCmdLine_" + IO.Path.GetFileName(appPath); }
/// <summary> /// Initializes a new instance of the <see cref="RegValue"/> class with properties initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="RegValue"/> instance.</param> /// <param name="key">The registry key name.</param> /// <param name="name">The registry entry name.</param> /// <param name="value">The registry entry value.</param> public RegValue(Id id, string key, string name, object value) { Id = id.Value; Name = name; Key = key; Value = value; }
/// <summary> /// Creates instance of the <see cref="File"></see> class with properties initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="File"/> instance.</param> /// <param name="feature"><see cref="Feature"></see> the file should be included in.</param> /// <param name="sourcePath">Relative path to the file to be taken for building the MSI.</param> /// <param name="items">Optional <see cref="FileShortcut"/> parameters defining shortcuts to the file to be created /// during the installation.</param> public File(Id id, Feature feature, string sourcePath, params WixEntity[] items) { Id = id.Value; Name = sourcePath; Feature = feature; AddItems(items); }
/// <summary> /// Creates an instance of SqlString from <paramref name="sql"/> to be rolled-back according to <paramref name="rollbackOptions"/> /// </summary> /// <param name="id"></param> /// <param name="sqlDb"></param> /// <param name="sql"></param> /// <param name="rollbackOptions"></param> public SqlString(Id id, string sqlDb, string sql, RollbackSql rollbackOptions) : this(sql, rollbackOptions) { Id = id; SqlDb = sqlDb; }
/// <summary> /// Creates an instance of Certificate where the certificate is a binary resource /// </summary> /// <param name="id">The identifier.</param> /// <param name="feature">The feature.</param> /// <param name="name">The name.</param> /// <param name="storeLocation">The store location.</param> /// <param name="storeName">Name of the store.</param> /// <param name="binaryKey">The binary key.</param> public Certificate(Id id, Feature feature, string name, StoreLocation storeLocation, StoreName storeName, string binaryKey) : this(name, storeLocation, storeName, binaryKey) { Id = id; Feature = feature; }
/// <summary> /// Initializes a new instance of the <see cref="ManagedAction"/> class with properties/fields initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="ManagedAction"/> instance.</param> /// <param name="name">Name of the CustomAction. The name should match the method implementing the custom action functionality.</param> /// <param name="actionAssembly">Path to the assembly containing the CustomAction implementation. Specify <c>"%this%"</c> if the assembly /// is in the Wix# script.</param> /// <param name="returnType">The return type of the action.</param> /// <param name="when"><see cref="T:WixSharp.When"/> the action should be executed with respect to the <paramref name="step"/> parameter.</param> /// <param name="step"><see cref="T:WixSharp.Step"/> the action should be executed before/after during the installation.</param> /// <param name="condition">The launch condition for the <see cref="ManagedAction"/>.</param> /// <param name="sequence">The MSI sequence the action belongs to.</param> public ManagedAction(Id id, string name, string actionAssembly, Return returnType, When when, Step step, Condition condition, Sequence sequence) : base(id, returnType, when, step, condition, sequence) { Name = "Action" + (++count) + "_" + name; MethodName = name; ActionAssembly = actionAssembly; }
/// <summary> /// Initializes a new instance of the <see cref="ElevatedManagedAction"/> class with properties/fields initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="ElevatedManagedAction"/> instance.</param> /// <param name="name">Name of the CustomAction. The name should match the method implementing the custom action functionality.</param> /// <param name="actionAssembly">Path to the assembly containing the CustomAction implementation. Specify <c>"%this%"</c> if the assembly /// is in the Wix# script.</param> /// <param name="returnType">The return type of the action.</param> /// <param name="when"><see cref="T:WixSharp.When"/> the action should be executed with respect to the <paramref name="step"/> parameter.</param> /// <param name="step"><see cref="T:WixSharp.Step"/> the action should be executed before/after during the installation.</param> /// <param name="condition">The launch condition for the <see cref="ManagedAction"/>.</param> /// <param name="sequence">The MSI sequence the action belongs to.</param> public ElevatedManagedAction(Id id, string name, string actionAssembly, Return returnType, When when, Step step, Condition condition, Sequence sequence) : base(id, name, actionAssembly, returnType, when, step, condition, sequence) { Impersonate = false; Execute = Execute.deferred; UsesProperties = "INSTALLDIR"; }
/// <summary> /// Initializes a new instance of the <see cref="PathFileAction"/> class with properties/fields initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="PathFileAction"/> instance.</param> /// <param name="appPath">Path to the file to be executed on the target system.</param> /// <param name="args">The arguments to be passed to the file during the execution.</param> /// <param name="workingDir">Working directory for the file execution.</param> /// <param name="returnType">The return type of the action.</param> /// <param name="when"><see cref="T:WixSharp.When"/> the action should be executed with respect to the <paramref name="step"/> parameter.</param> /// <param name="step"><see cref="T:WixSharp.Step"/> the action should be executed before/after during the installation.</param> /// <param name="condition">The launch condition for the <see cref="PathFileAction"/>.</param> /// <param name="sequence">The MSI sequence the action belongs to.</param> public PathFileAction(Id id, string appPath, string args, string workingDir, Return returnType, When when, Step step, Condition condition, Sequence sequence) : base(id, returnType, when, step, condition, sequence) { AppPath = appPath; Args = args; WorkingDir = workingDir; Name = "Action" + (++count) + "_" + IO.Path.GetFileName(appPath); }
/// <summary> /// Initializes a new instance of the <see cref="Dialog"/> class. /// </summary> /// <param name="id">The id.</param> public Dialog(Id id) { base.Id = id; }
/// <summary> /// Creates an instance of SqlString from <paramref name="sql"/> to be execute according to <paramref name="executeOptions"/> /// </summary> /// <param name="id"></param> /// <param name="sqlDb"></param> /// <param name="sql"></param> /// <param name="executeOptions"></param> public SqlString(Id id, SqlDatabase sqlDb, string sql, ExecuteSql executeOptions) : this(sql, executeOptions) { Id = id; SqlDb = sqlDb.Id; }
/// <summary> /// Initializes a new instance of the <see cref="PathFileAction"/> class with properties/fields initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="PathFileAction"/> instance.</param> /// <param name="appPath">Path to the file to be executed on the target system.</param> /// <param name="args">The arguments to be passed to the file during the execution.</param> /// <param name="workingDir">Working directory for the file execution.</param> public PathFileAction(Id id, string appPath, string args, string workingDir) : base(id) { AppPath = appPath; Args = args; WorkingDir = workingDir; Name = "Action" + (++count) + "_" + IO.Path.GetFileName(appPath); }
/// <summary> /// Creates an instance of SqlString from <paramref name="sql"/> to be execute according to <paramref name="executeOptions"/> /// </summary> /// <param name="id"></param> /// <param name="sqlDb"></param> /// <param name="sql"></param> /// <param name="executeOptions"></param> public SqlString(Id id, string sqlDb, string sql, ExecuteSql executeOptions) : this(sql, executeOptions) { Id = id; SqlDb = sqlDb; }
/// <summary> /// Creates an instance of SqlString from <paramref name="sql"/> to be rolled-back according to <paramref name="rollbackOptions"/> /// </summary> /// <param name="id"></param> /// <param name="feature"></param> /// <param name="sql"></param> /// <param name="rollbackOptions"></param> public SqlString(Id id, Feature feature, string sql, RollbackSql rollbackOptions) : this(sql, rollbackOptions) { Id = id; Feature = feature; }
/// <summary> /// Creates an instance of SqlString from <paramref name="sql"/> to be rolled-back according to <paramref name="rollbackOptions"/> /// </summary> /// <param name="id"></param> /// <param name="sqlDb"></param> /// <param name="sql"></param> /// <param name="rollbackOptions"></param> public SqlString(Id id, SqlDatabase sqlDb, string sql, RollbackSql rollbackOptions) : this(sql, rollbackOptions) { Id = id; SqlDb = sqlDb.Id; }
/// <summary> /// Initializes a new instance of the <see cref="BinaryFileAction"/> class with properties/fields initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="BinaryFileAction"/> instance.</param> /// <param name="key">The key (file name) of the installed file to be executed.</param> /// <param name="args">The arguments to be passed to the file during the execution.</param> /// <param name="returnType">The return type of the action.</param> /// <param name="when"><see cref="T:WixSharp.When"/> the action should be executed with respect to the <paramref name="step"/> parameter.</param> /// <param name="step"><see cref="T:WixSharp.Step"/> the action should be executed before/after during the installation.</param> /// <param name="condition">The launch condition for the <see cref="BinaryFileAction"/>.</param> /// <param name="sequence">The MSI sequence the action belongs to.</param> public BinaryFileAction(Id id, string key, string args, Return returnType, When when, Step step, Condition condition, Sequence sequence) : base(id, returnType, when, step, condition, sequence) { Key = key; Args = args; Name = "Action" + (++count) + "_" + key; }
/// <summary> /// Initializes a new instance of the <see cref="CopyFile"/> class. /// </summary> /// <param name="id">The identifier.</param> public CopyFile(Id id) { Id = id; }
/// <summary> /// Creates an instance of Certificate where the certificate is a binary resource /// </summary> /// <param name="id">The identifier.</param> /// <param name="feature">The feature.</param> /// <param name="name">The name.</param> /// <param name="storeLocation">The store location.</param> /// <param name="storeName">Name of the store.</param> /// <param name="binaryKey">The binary key.</param> public Certificate(Id id, Feature feature, string name, StoreLocation storeLocation, StoreName storeName, string binaryKey) : this(name, storeLocation, storeName, binaryKey) { Id = id; Feature = feature; }
/// <summary> /// Creates an instance of User representing <paramref name="name" /> /// </summary> /// <param name="id">The identifier.</param> /// <param name="name">The name.</param> /// <exception cref="ArgumentNullException">name;name is a null reference or empty</exception> public User(Id id, string name) : this(name) { Id = id; }
/// <summary> /// Initializes a new instance of the <see cref="RegValueProperty"/> class with properties/fields initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="RegValueProperty"/> instance.</param> /// <param name="name">The name of the property.</param> /// <param name="root">The registry hive name.</param> /// <param name="key">The registry key name.</param> /// <param name="entryName">The registry entry name.</param> /// <param name="defaultValue">The registry entry default value.</param> public RegValueProperty(Id id, string name, RegistryHive root, string key, string entryName, string defaultValue = "") { Id = id.Value; Name = name; Root = root; EntryName = entryName; Key = key; Value = defaultValue; }
/// <summary> /// Creates an instance of User representing <paramref name="name" />@<paramref name="domain" /> /// </summary> /// <param name="id">The identifier.</param> /// <param name="name">The name.</param> /// <param name="domain">The domain.</param> public User(Id id, string name, string domain) : this(id, name) { Domain = domain; }
/// <summary> /// Initializes a new instance of the <see cref="FileShortcut"/> class with properties/fields initialized with specified parameters. /// <para>This constructor should be used to instantiate shortcuts, which belong to the <see cref="File"/> element.</para> /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="FileShortcut"/> instance.</param> /// <param name="name">The name of the shortcut to be installed.</param> /// <param name="location">The directory where the shortcut should be installed.</param> public FileShortcut(Id id, string name, string location) { Id = id.Value; Name = name; Location = location; }
/// <summary> /// Creates an instance of SqlString from <paramref name="sql"/> to be execute according to <paramref name="executeOptions"/> /// </summary> /// <param name="id"></param> /// <param name="feature"></param> /// <param name="sql"></param> /// <param name="executeOptions"></param> public SqlString(Id id, Feature feature, string sql, ExecuteSql executeOptions) : this(sql, executeOptions) { Id = id; Feature = feature; }
/// <summary> /// Creates an instance of User representing <paramref name="name" /> /// </summary> /// <param name="id">The identifier.</param> /// <param name="feature">The feature.</param> /// <param name="name">The name.</param> public User(Id id, Feature feature, string name) : this(id, name) { Feature = feature; }
/// <summary> /// Initializes a new instance of the <see cref="FileShortcut"/> class with properties/fields initialized with specified parameters. /// <para>This constructor should be used to instantiate shortcuts, which belong to the <see cref="File"/> element.</para> /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="FileShortcut"/> instance.</param> /// <param name="feature"><see cref="Feature"></see> the shortcut should be included in.</param> /// <param name="name">The name of the shortcut to be installed.</param> /// <param name="location">The directory where the shortcut should be installed.</param> public FileShortcut(Id id, Feature feature, string name, string location) : this(id, feature, location) { Name = name; }
/// <summary> /// Creates an instance of User representing <paramref name="name" />@<paramref name="domain" /> /// </summary> /// <param name="id">The identifier.</param> /// <param name="feature">The feature.</param> /// <param name="name">The name.</param> /// <param name="domain">The domain.</param> public User(Id id, Feature feature, string name, string domain) : this(id, feature, name) { Domain = domain; }
/// <summary> /// Initializes a new instance of the <see cref="FileShortcut"/> class with properties/fields initialized with specified parameters. /// <para>This constructor should be used to instantiate shortcuts, which belong to the <see cref="File"/> element.</para> /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="FileShortcut"/> instance.</param> /// <param name="feature"><see cref="Feature"></see> the shortcut should be included in.</param> /// <param name="location">The directory where the shortcut should be installed.</param> public FileShortcut(Id id, Feature feature, string location) { Id = id.Value; Feature = feature; Location = location; }
/// <summary> /// Creates an instance of Certificate where the certificate is requested or exists at the specified path /// </summary> /// <param name="id">The identifier.</param> /// <param name="feature">The feature.</param> /// <param name="name">The name.</param> /// <param name="storeLocation">The store location.</param> /// <param name="storeName">Name of the store.</param> /// <param name="certificatePath">The certificate path.</param> /// <param name="request">if set to <c>true</c> [request].</param> public Certificate(Id id, Feature feature, string name, StoreLocation storeLocation, StoreName storeName, string certificatePath, bool request) : this(name, storeLocation, storeName, certificatePath, request) { Id = id; Feature = feature; }
/// <summary> /// Initializes a new instance of the <see cref="EnvironmentVariable"/> class. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="EnvironmentVariable"/> instance.</param> /// <param name="feature"><see cref="Feature"></see> the environment variable should be included in.</param> /// <param name="name">The name.</param> /// <param name="value">The value.</param> public EnvironmentVariable(Id id, Feature feature, string name, string value) { this.Id = id.Value; this.Feature = feature; this.Name = name; this.Value = value; }
/// <summary> /// Initializes a new instance of the <see cref="RegValue"/> class with properties initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="RegValue"/> instance.</param> /// <param name="feature"><see cref="Feature"></see> the registry value should be included in.</param> /// <param name="root">The registry hive name.</param> /// <param name="key">The registry key name.</param> /// <param name="name">The registry entry name.</param> /// <param name="value">The registry entry value.</param> public RegValue(Id id, Feature feature, RegistryHive root, string key, string name, object value) { Id = id.Value; Name = name; Root = root; Key = key; Value = value; Feature = feature; }
/// <summary> /// Initializes a new instance of the <see cref="Control"/> class. /// </summary> /// <param name="id">The <c>Control</c> id.</param> public Control(Id id) { base.Id = id; }
/// <summary> /// Initializes a new instance of the <see cref="Dir"/> class with properties/fields initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="Dir"/> instance.</param> /// <param name="feature"><see cref="Feature"></see> the directory should be included in.</param> /// <param name="targetPath">The name of the directory. Note if the directory is a root installation directory <c>targetPath</c> must /// be specified as a full path. However if the directory is a nested installation directory the name must be a directory name only.</param> /// <param name="items">Any <see cref="WixEntity"/> which can be contained by directory (e.g. file, subdirectory).</param> public Dir(Id id, Feature feature, string targetPath, params WixEntity[] items) { Dir lastDir = ProcessTargetPath(targetPath); lastDir.AddItems(items); lastDir.Id = id; lastDir.Feature = feature; }
/// <summary> /// Initializes a new instance of the <see cref="ManagedAction"/> class with properties/fields initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="ManagedAction"/> instance.</param> /// <param name="name">Name of the CustomAction. The name should match the method implementing the custom action functionality.</param> public ManagedAction(Id id, string name) : base(id) { Name = "Action" + (++count) + "_" + name; MethodName = name; Return = Return.check; }
/// <summary> /// Executes a new instance of the <see cref="QtCmdLineAction"/> class with properties/fields initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="QtCmdLineAction"/> instance.</param> /// <param name="appPath">Path to the application to be executed. This can be a file name only if the location of the application is well-known.</param> /// <param name="args">The arguments to be passed to the application during the execution.</param> public QtCmdLineAction(Id id, string appPath, string args) : base(id) { AppPath = appPath; Args = args; Name = "Action" + (++count) + "_QtCmdLine_" + IO.Path.GetFileName(appPath); Return = Return.check; }
/// <summary> /// Initializes a new instance of the <see cref="ManagedAction"/> class with properties/fields initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="ManagedAction"/> instance.</param> /// <param name="name">Name of the CustomAction. The name should match the method implementing the custom action functionality.</param> /// <param name="actionAssembly">Path to the assembly containing the CustomAction implementation. Specify <c>"%this%"</c> if the assembly /// is in the Wix# script.</param> public ManagedAction(Id id, string name, string actionAssembly) : base(id) { Name = "Action" + (++count) + "_" + name; MethodName = name; ActionAssembly = actionAssembly; base.Return = Return.check; }
/// <summary> /// Initializes a new instance of the <see cref="ManagedAction"/> class with properties/fields initialized with specified parameters. /// </summary> /// <param name="id">The explicit <see cref="Id"></see> to be associated with <see cref="ManagedAction"/> instance.</param> /// <param name="name">Name of the CustomAction. The name should match the method implementing the custom action functionality.</param> /// <param name="returnType">The return type of the action.</param> /// <param name="when"><see cref="T:WixSharp.When"/> the action should be executed with respect to the <paramref name="step"/> parameter.</param> /// <param name="step"><see cref="T:WixSharp.Step"/> the action should be executed before/after during the installation.</param> /// <param name="condition">The launch condition for the <see cref="ManagedAction"/>.</param> public ManagedAction(Id id, string name, Return returnType, When when, Step step, Condition condition) : base(id, returnType, when, step, condition) { Name = "Action" + (++count) + "_" + name; MethodName = name; }
/// <summary> /// Creates an instance of Certificate where the certificate is requested or exists at the specified path /// </summary> /// <param name="id">The identifier.</param> /// <param name="feature">The feature.</param> /// <param name="name">The name.</param> /// <param name="storeLocation">The store location.</param> /// <param name="storeName">Name of the store.</param> /// <param name="certificatePath">The certificate path.</param> /// <param name="request">if set to <c>true</c> [request].</param> public Certificate(Id id, Feature feature, string name, StoreLocation storeLocation, StoreName storeName, string certificatePath, bool request) : this(name, storeLocation, storeName, certificatePath, request) { Id = id; Feature = feature; }