I've written a PowerShell script that creates a Self-Extracting Archive (a.k.a. SFX) executable file with WinRAR command-line. The problem is that the VERSIONINFO metadata is completely empty (accessed by right-clicking the *.exe
file that was built, going to Properties, and clicking on the Details tab).
Here is the WinRAR command I'm using in my script:
$WinRarInstallPath = "$Env:ProgramFiles\WinRAR\winrar"
<#
WinRAR arguments used:
a - Add files to an archive
-cfg- - Ignore default profile and environment variable
-ep1 - Exclude base folder from names
-iadm - Request administrative access for SFX archive
-iicon - Path to icon to use for installer
-r - Recurse subfolders
-sfx - Create self-extracting archive
-z - Path to archive comment file (SFX configuration file)
#>
&$WinRarInstallPath a -cfg- -ep1 -iadm -iicon"$IconPath" -r -sfx -z"$ConfigFilePath" `
"$InstallerName" "$SourceFilesPath\*" | Out-Null
Is there a command-line switch for WinRAR that can allow me to fill in the version and copyright information? If not, is there some way to fill that information in after the SFX's *.exe
file is built?