C# 클래스 WixSharp.CommonTasks.Tasks

파일 보기 프로젝트 열기: Eun/WixSharp

공개 메소드들

메소드 설명
AddAction ( this project ) : Project

Adds the action.

AddAssociation ( this file ) : File

Adds the file association.

AddBinary ( this project ) : Project

Adds the binary.

AddDir ( this dir ) : Dir

Adds the dir.

AddDir ( this project ) : Project

Adds the dir.

AddDirFileCollection ( this dir ) : Dir

Adds the dir file collection.

AddEnvironmentVariable ( this project ) : Project

Adds the environment variable.

AddFile ( this dir ) : Dir

Adds the file.

AddFileCollection ( this dir ) : Dir

Adds the file collection.

AddMergeModule ( this dir ) : Dir

Adds the merge module.

AddProperty ( this project ) : Project

Adds the property.

AddRefAssembly ( this action ) : ManagedAction

Adds the assembly reference.

AddRegValue ( this project ) : Project

Adds the registry value.

AddShortcut ( this dir ) : Dir

Adds the shortcut.

AddShortcut ( this file ) : File

Adds the shortcut.

BuildBootstrapper ( string prerequisiteFile, string primaryFile, string outputFile, string prerequisiteRegKeyValue ) : string

Builds the bootstrapper.

BuildBootstrapper ( string prerequisiteFile, string primaryFile, string outputFile, string prerequisiteRegKeyValue, bool doNotPostVerifyPrerequisite ) : string

Builds the bootstrapper.

BuildBootstrapper ( string prerequisiteFile, string primaryFile, string outputFile, string prerequisiteRegKeyValue, bool doNotPostVerifyPrerequisite, string optionalArguments ) : string

Builds the bootstrapper.

DigitalySign ( string fileToSign, string pfxFile, string timeURL, string password ) : int

Applies digital signature to a file (e.g. msi, exe, dll) with MS SignTool.exe utility.

If you need to specify extra SignTool.exe parameters or the location of the tool use the overloaded DigitalySign signature

DigitalySign ( string fileToSign, string pfxFile, string timeURL, string password, string optionalArguments = null, string wellKnownLocations = null ) : int

Applies digital signature to a file (e.g. msi, exe, dll) with MS SignTool.exe utility.

GetFileVersion ( string file ) : System.Version

Gets the file version.

ImportRegFile ( this project, string regFile ) : Project

Imports the reg file. It is nothing else but an extension method version of the 'plain' T:WixSharp.CommonTasks.Tasks.ImportRegFile.

ImportRegFile ( string regFile ) : WixSharp.RegValue[]

Imports the reg file.

InjectClrDialog ( this project, string showDialogMethod, string prevDialog, string nextDialog ) : Project

Injects CLR dialog between MSI dialogs 'prevDialog' and 'nextDialog'. Passes custom action CLR method name (showDialogMethod) for instantiating and popping up the CLR dialog.

InstallService ( string serviceFile, bool isInstalling ) : string

Installs the windows service. It uses InstallUtil.exe to complete the actual installation/uninstallation. During the run for the InstallUtil.exe console window is hidden. /// If any error occurred the console output is captured and embedded into the raised Exception object.

RemoveDialogsBetween ( this project, string start, string end ) : Project

Removes the dialogs between specified two dialogs. It simply connects 'next' button of the start dialog with the 'NewDialog' action associated with the end dialog. And vise versa for the 'back' button.

SetConfigAttribute ( this config, string elementPath, string value ) : System.Xml.Linq.XElement

Sets the value of the attribute value in the .NET application configuration file according the specified XPath expression.

This simple routine is to be used for the customization of the installed config files (e.g. in the deferred custom actions).

SetConfigAttribute ( string configFile, string elementPath, string value ) : void

Sets the value of the attribute value in the .NET application configuration file according the specified XPath expression.

This simple routine is to be used for the customization of the installed config files (e.g. in the deferred custom actions).

SetNetFxPrerequisite ( this project, string versionCondition, string errorMessage = null ) : Project

Binds the LaunchCondition to the version condition based on WiXNetFxExtension properties.

The typical conditions are:

NETFRAMEWORK20="#1"

NETFRAMEWORK40FULL="#1"

NETFRAMEWORK35="#1"

NETFRAMEWORK30_SP_LEVEL and NOT NETFRAMEWORK30_SP_LEVEL='#0'

...

The full list of names and values can be found here http://wixtoolset.org/documentation/manual/v3/customactions/wixnetfxextension.html

SetVersionFrom ( this project, string fileId ) : Project

Sets the Project version from the file version of the file specified by it's ID.

This method sets project WixSourceGenerated event handler and injects "!(bind.FileVersion.<file ID>" into the XML Product's Version attribute.

StartService ( string service, bool throwOnError = true ) : string

Starts the windows service. It uses sc.exe to complete the action. During the action console window is hidden. If any error occurred the console output is captured and embedded into the raised Exception object.

StopService ( string service, bool throwOnError = true ) : string

Stops the windows service. It uses sc.exe to complete the action. During the action console window is hidden. If any error occurred the console output is captured and embedded into the raised Exception object.

비공개 메소드들

메소드 설명
AddEnvironmentVariabl ( this project ) : Project
InjectClrDialogInFeatureTreeUI ( this project, string showDialogMethod, string prevDialog, string nextDialog ) : Project
ServiceDo ( string action, string service, bool throwOnError ) : string
SetClrPrerequisite ( this project, string version, string errorMessage = null ) : Project

메소드 상세

AddAction() 공개 정적인 메소드

Adds the action.
public static AddAction ( this project ) : Project
project this The project.
리턴 WixSharp.Project

AddAssociation() 공개 정적인 메소드

Adds the file association.
public static AddAssociation ( this file ) : File
file this The file.
리턴 File

AddBinary() 공개 정적인 메소드

Adds the binary.
public static AddBinary ( this project ) : Project
project this The project.
리턴 WixSharp.Project

AddDir() 공개 정적인 메소드

Adds the dir.
public static AddDir ( this dir ) : Dir
dir this The dir.
리턴 WixSharp.Dir

AddDir() 공개 정적인 메소드

Adds the dir.
public static AddDir ( this project ) : Project
project this The project.
리턴 WixSharp.Project

AddDirFileCollection() 공개 정적인 메소드

Adds the dir file collection.
public static AddDirFileCollection ( this dir ) : Dir
dir this The dir.
리턴 WixSharp.Dir

AddEnvironmentVariable() 공개 정적인 메소드

Adds the environment variable.
public static AddEnvironmentVariable ( this project ) : Project
project this The project.
리턴 WixSharp.Project

AddFile() 공개 정적인 메소드

Adds the file.
public static AddFile ( this dir ) : Dir
dir this The dir.
리턴 WixSharp.Dir

AddFileCollection() 공개 정적인 메소드

Adds the file collection.
public static AddFileCollection ( this dir ) : Dir
dir this The dir.
리턴 WixSharp.Dir

AddMergeModule() 공개 정적인 메소드

Adds the merge module.
public static AddMergeModule ( this dir ) : Dir
dir this The dir.
리턴 WixSharp.Dir

AddProperty() 공개 정적인 메소드

Adds the property.
public static AddProperty ( this project ) : Project
project this The project.
리턴 WixSharp.Project

AddRefAssembly() 공개 정적인 메소드

Adds the assembly reference.
public static AddRefAssembly ( this action ) : ManagedAction
action this The action.
리턴 WixSharp.ManagedAction

AddRegValue() 공개 정적인 메소드

Adds the registry value.
public static AddRegValue ( this project ) : Project
project this The project.
리턴 WixSharp.Project

AddShortcut() 공개 정적인 메소드

Adds the shortcut.
public static AddShortcut ( this dir ) : Dir
dir this The dir.
리턴 WixSharp.Dir

AddShortcut() 공개 정적인 메소드

Adds the shortcut.
public static AddShortcut ( this file ) : File
file this The file.
리턴 File

BuildBootstrapper() 공개 정적인 메소드

Builds the bootstrapper.
public static BuildBootstrapper ( string prerequisiteFile, string primaryFile, string outputFile, string prerequisiteRegKeyValue ) : string
prerequisiteFile string The prerequisite file.
primaryFile string The primary setup file.
outputFile string The output (bootsrtapper) file.
prerequisiteRegKeyValue string The prerequisite registry key value. /// This value is used to determine if the PrerequisiteFile should be launched. /// This value must comply with the following pattern: <RegistryHive>:<KeyPath>:<ValueName>. /// PrerequisiteRegKeyValue = @"HKLM:Software\My Company\My Product:Installed"; /// Existence of the specified registry value at runtime is interpreted as an indication of the PrerequisiteFile has been already installed. /// Thus bootstrapper will execute PrimaryFile without launching PrerequisiteFile first.
리턴 string

BuildBootstrapper() 공개 정적인 메소드

Builds the bootstrapper.
public static BuildBootstrapper ( string prerequisiteFile, string primaryFile, string outputFile, string prerequisiteRegKeyValue, bool doNotPostVerifyPrerequisite ) : string
prerequisiteFile string The prerequisite file.
primaryFile string The primary setup file.
outputFile string The output (bootsrtapper) file.
prerequisiteRegKeyValue string The prerequisite registry key value. /// This value is used to determine if the PrerequisiteFile should be launched. /// This value must comply with the following pattern: <RegistryHive>:<KeyPath>:<ValueName>. /// PrerequisiteRegKeyValue = @"HKLM:Software\My Company\My Product:Installed"; /// Existence of the specified registry value at runtime is interpreted as an indication of the PrerequisiteFile has been already installed. /// Thus bootstrapper will execute PrimaryFile without launching PrerequisiteFile first.
doNotPostVerifyPrerequisite bool The flag which allows you to disable verification of PrerequisiteRegKeyValue after the prerequisite setup is completed. /// Normally if bootstrapper checkers if PrerequisiteRegKeyValue/> exists straight after the prerequisite installation and starts /// the primary setup only if it does. /// It is possible to instruct bootstrapper to continue with the primary setup regardless of the prerequisite installation outcome. This can be done /// by setting DoNotPostVerifyPrerequisite to true (default is false) ///
리턴 string

BuildBootstrapper() 공개 정적인 메소드

Builds the bootstrapper.
public static BuildBootstrapper ( string prerequisiteFile, string primaryFile, string outputFile, string prerequisiteRegKeyValue, bool doNotPostVerifyPrerequisite, string optionalArguments ) : string
prerequisiteFile string The prerequisite file.
primaryFile string The primary setup file.
outputFile string The output (bootsrtapper) file.
prerequisiteRegKeyValue string The prerequisite registry key value. /// This value is used to determine if the PrerequisiteFile should be launched. /// This value must comply with the following pattern: <RegistryHive>:<KeyPath>:<ValueName>. /// PrerequisiteRegKeyValue = @"HKLM:Software\My Company\My Product:Installed"; /// Existence of the specified registry value at runtime is interpreted as an indication of the PrerequisiteFile has been alreday installed. /// Thus bootstrapper will execute PrimaryFile without launching PrerequisiteFile first.
doNotPostVerifyPrerequisite bool The flag which allows you to disable verification of PrerequisiteRegKeyValue after the prerequisite setup is completed. /// Normally if bootstrapper checks if PrerequisiteRegKeyValue/> exists straight after the prerequisite installation and starts /// the primary setup only if it does. /// It is possible to instruct bootstrapper to continue with the primary setup regardless of the prerequisite installation outcome. This can be done /// by setting DoNotPostVerifyPrerequisite to true (default is false) ///
optionalArguments string The optional arguments for the bootstrapper compiler.
리턴 string

DigitalySign() 공개 정적인 메소드

Applies digital signature to a file (e.g. msi, exe, dll) with MS SignTool.exe utility.

If you need to specify extra SignTool.exe parameters or the location of the tool use the overloaded DigitalySign signature

public static DigitalySign ( string fileToSign, string pfxFile, string timeURL, string password ) : int
fileToSign string The file to sign.
pfxFile string Specify the signing certificate in a file. If this file is a PFX with a password, the password may be supplied /// with the password parameter.
timeURL string The timestamp server's URL. If this option is not present, the signed file will not be timestamped. /// A warning is generated if timestamping fails.
password string The password to use when opening the PFX file.
리턴 int

DigitalySign() 공개 정적인 메소드

Applies digital signature to a file (e.g. msi, exe, dll) with MS SignTool.exe utility.
public static DigitalySign ( string fileToSign, string pfxFile, string timeURL, string password, string optionalArguments = null, string wellKnownLocations = null ) : int
fileToSign string The file to sign.
pfxFile string Specify the signing certificate in a file. If this file is a PFX with a password, the password may be supplied /// with the password parameter.
timeURL string The timestamp server's URL. If this option is not present (pass to null), the signed file will not be timestamped. /// A warning is generated if timestamping fails.
password string The password to use when opening the PFX file. Should be null if no password required.
optionalArguments string Extra arguments to pass to the SignTool.exe utility.
wellKnownLocations string The optional ';' separated list of directories where SignTool.exe can be located. /// If this parameter is not specified WixSharp will try to locate the SignTool in the built-in well-known locations (system PATH)
리턴 int

GetFileVersion() 공개 정적인 메소드

Gets the file version.
public static GetFileVersion ( string file ) : System.Version
file string The path to the file.
리턴 System.Version

ImportRegFile() 공개 정적인 메소드

Imports the reg file. It is nothing else but an extension method version of the 'plain' T:WixSharp.CommonTasks.Tasks.ImportRegFile.
public static ImportRegFile ( this project, string regFile ) : Project
project this The project object.
regFile string The reg file.
리턴 WixSharp.Project

ImportRegFile() 공개 정적인 메소드

Imports the reg file.
public static ImportRegFile ( string regFile ) : WixSharp.RegValue[]
regFile string The reg file.
리턴 WixSharp.RegValue[]

InjectClrDialog() 공개 정적인 메소드

Injects CLR dialog between MSI dialogs 'prevDialog' and 'nextDialog'. Passes custom action CLR method name (showDialogMethod) for instantiating and popping up the CLR dialog.
public static InjectClrDialog ( this project, string showDialogMethod, string prevDialog, string nextDialog ) : Project
project this The project.
showDialogMethod string The show dialog method.
prevDialog string The previous dialog.
nextDialog string The next dialog.
리턴 WixSharp.Project

InstallService() 공개 정적인 메소드

Installs the windows service. It uses InstallUtil.exe to complete the actual installation/uninstallation. During the run for the InstallUtil.exe console window is hidden. /// If any error occurred the console output is captured and embedded into the raised Exception object.
public static InstallService ( string serviceFile, bool isInstalling ) : string
serviceFile string The service file.
isInstalling bool if set to true [is installing].
리턴 string

RemoveDialogsBetween() 공개 정적인 메소드

Removes the dialogs between specified two dialogs. It simply connects 'next' button of the start dialog with the 'NewDialog' action associated with the end dialog. And vise versa for the 'back' button.
public static RemoveDialogsBetween ( this project, string start, string end ) : Project
project this The project.
start string The start.
end string The end.
리턴 WixSharp.Project

SetConfigAttribute() 공개 정적인 메소드

Sets the value of the attribute value in the .NET application configuration file according the specified XPath expression.

This simple routine is to be used for the customization of the installed config files (e.g. in the deferred custom actions).

public static SetConfigAttribute ( this config, string elementPath, string value ) : System.Xml.Linq.XElement
config this The configuration file element.
elementPath string The element XPath value. It should include the attribute name.
value string The value to be set to the attribute.
리턴 System.Xml.Linq.XElement

SetConfigAttribute() 공개 정적인 메소드

Sets the value of the attribute value in the .NET application configuration file according the specified XPath expression.

This simple routine is to be used for the customization of the installed config files (e.g. in the deferred custom actions).

public static SetConfigAttribute ( string configFile, string elementPath, string value ) : void
configFile string The configuration file.
elementPath string The element XPath value. It should include the attribute name.
value string The value to be set to the attribute.
리턴 void

SetNetFxPrerequisite() 공개 정적인 메소드

Binds the LaunchCondition to the version condition based on WiXNetFxExtension properties.

The typical conditions are:

NETFRAMEWORK20="#1"

NETFRAMEWORK40FULL="#1"

NETFRAMEWORK35="#1"

NETFRAMEWORK30_SP_LEVEL and NOT NETFRAMEWORK30_SP_LEVEL='#0'

...

The full list of names and values can be found here http://wixtoolset.org/documentation/manual/v3/customactions/wixnetfxextension.html
public static SetNetFxPrerequisite ( this project, string versionCondition, string errorMessage = null ) : Project
project this The project.
versionCondition string Condition expression. ///
errorMessage string The error message to be displayed if .NET version is not present.
리턴 WixSharp.Project

SetVersionFrom() 공개 정적인 메소드

Sets the Project version from the file version of the file specified by it's ID.

This method sets project WixSourceGenerated event handler and injects "!(bind.FileVersion.<file ID>" into the XML Product's Version attribute.

public static SetVersionFrom ( this project, string fileId ) : Project
project this The project.
fileId string The file identifier.
리턴 WixSharp.Project

StartService() 공개 정적인 메소드

Starts the windows service. It uses sc.exe to complete the action. During the action console window is hidden. If any error occurred the console output is captured and embedded into the raised Exception object.
public static StartService ( string service, bool throwOnError = true ) : string
service string The service.
throwOnError bool if set to true [throw on error].
리턴 string

StopService() 공개 정적인 메소드

Stops the windows service. It uses sc.exe to complete the action. During the action console window is hidden. If any error occurred the console output is captured and embedded into the raised Exception object.
public static StopService ( string service, bool throwOnError = true ) : string
service string The service.
throwOnError bool if set to true [throw on error].
리턴 string