New-ZipSfxOptions

Synopsis

Makes a configuration object used when building a self-extracting archive.

Syntax

New-ZipSfxOptions [[-ExeOnUnpack] <String>] [[-ExtractDirectory] <String>] [[-Description] <String>] [-FileVersion <Version>] [-IconFile <String>] [-NameOfProduct <String>] [-VersionOfProduct <String>] [-Copyright <String>] [-AdditionalCompilerSwitches <String>] [-Quiet] [-Remove] [-CmdLine] [<CommonParameters>]

New-ZipSfxOptions [[-ExeOnUnpack] <String>] [[-ExtractDirectory] <String>] [[-Description] <String>] [-FileVersion <Version>] [-IconFile <String>] [-NameOfProduct <String>] [-VersionOfProduct <String>] [-Copyright <String>] [-AdditionalCompilerSwitches <String>] [[-WindowTitle] <String>] [-Quiet] [-Remove] [-GUI] [<CommonParameters>]

Description

Makes a configuration object used when building a self-extracting archive.

Parameters

-ExeOnUnpack <String>

Specifies the program and its parameters, to run after all the files in the archive are unzipped.

Required? False
Position? 0
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-ExtractDirectory <String>

Specifies the default directory decompression. It may contains references to system variable, for example %UserProfile%. These are substituted during the execution of the self-extracting archive.

Required? False
Position? 1
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-Description <String>

Discloses the use of the self-extracting archive.

Required? False
Position? 2
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-FileVersion <Version>

Version number of the self-extracting file.

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-IconFile <String>

File name containing an icon for the Winform.

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-NameOfProduct <String>

Product name contained in the self-extracting archive.

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-VersionOfProduct <String>

Version number of the product contained in the archive.

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-Copyright <String>

Notice of copyright or copyleft.

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-AdditionalCompilerSwitches <String>

Further options used during the generation of the dotNET executable.

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-Quiet <SwitchParameter>

Exit the program when decompression is finished.

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-Remove <SwitchParameter>

Delete all files extracted from the archive at the end of the process.

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-CmdLine <SwitchParameter>

Specifies that self-extracting archive is based on a console program (CLI).

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-WindowTitle <String>

Winform title.

Required? False
Position? 3
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-GUI <SwitchParameter>

Specifies that the self-extracting archive is based on a Winform program (GUI).

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

Inputs

None

Outputs

Ionic.Zip.SelfExtractorSaveOptions

Notes

For all filled parameters of string type, spaces characters are deleted at the beginning or end of the string. Here is the list of properties with default values: Flavor : ConsoleApplication Quiet : False ExtractExistingFile : Throw RemoveUnpackedFilesAfterExecute : False FileVersion : 1.0.0.0 . Please note that the property 'ExtractExistingFile' must always have the value 'Throw'. This behavior is managed using the options on the generated executable.

Examples

EXAMPLE 1

PS C:\> $MyConfiguration=New-ZipSfxOptions -Copyright "This module is free for non-commercial purposes."

This statement creates a SFX configuration with default values ​​except for the Copyright field.

EXAMPLE 2

PS C:\> New-ZipSfxOptions -Copyright "This module is free for non-commercial purposes."|Set-PsIonicSfxOptions

This statement creates a SFX configuration and affects it to the default configuration.

Related links

AdditionalCompilerSwitches http://msdn.microsoft.com/en-us/library/system.codedom.compiler.compilerparameters(v=vs.80).aspx

PowerShell Support

  • PowerShell 2.0

Operating System Support

  • Windows 7
  • Windows 8
  • Windows 8.1
  • Windows Server 2008 all editions
  • Windows Server 2008 R2 all editions
  • Windows Server 2012 all editions
  • Windows Server 2012 R2 all editions

Last edited May 14, 2014 at 11:45 AM by LaurentDardenne, version 2

Comments

No comments yet.