与advinst.exe相比,更适合命令行调用,不会被对话框阻塞,执行过程和结果会在console中显示。
d:\>"C:\Program Files (x86)\Caphyon\Advanced Installer 15.0.1\bin\x86\AdvancedInstaller.com" /?
Advanced Installer 15.0.1
Usage:
AdvancedInstaller.com <path_to_project_file>
AdvancedInstaller.com /help [<command>] | /? [<command>]
AdvancedInstaller.com /build <path_to_project_file> { [-buildslist <builds_list>] | [-configurationslist <configurations_list>] }
AdvancedInstaller.com /rebuild <path_to_project_file> { [-buildslist <builds_list>] | [-configurationslist <configurations_list>] }
AdvancedInstaller.com /RunInVM <path_to_project_file> [-build name] -vmprofile {GUID} [-quiet]
AdvancedInstaller.com /edit <path_to_project_file> <command>
AdvancedInstaller.com /execute <path_to_project_file> <command_file_path> [-nofail]
AdvancedInstaller.com /loadpathvars <path_variables_file_path>
AdvancedInstaller.com /newproject <path_to_project_file> [-type project_type] [-lang project_language] [-overwrite]
AdvancedInstaller.com /register <license_id>
AdvancedInstaller.com /registerfloating <host>:<port>
AdvancedInstaller.com /cfglicensesrvproxy [-set <host>:<port>] | [-disable]
AdvancedInstaller.com /setrepositorypath <repository_path> [-move]
AdvancedInstaller.com /getrepositorypath
Supported Commands:
/SetVersion
/SetPackageName
/AddFile
/UpdateFile
/AddFileAssociation
/RegisterFile
/DelFile
/DelFileAssociation
/AddFolder
/DelFolder
/NewShortcut
/DelShortcut
/NewSync
/ResetSync
/RefreshSync
/SetProperty
/DelProperty
/GetProperty
/SetProductCode
/NewReg
/AddReg
/DelReg
/AddFileSearch
/DelFileSearch
/AddDrLocator
/DelDrLocator
/DelSearch
/AddRegLocator
/DelRegLocator
/AddCompLocator
/DelCompLocator
/AddIniLocator
/DelIniLocator
/SetBitmap
/DuplicateProject
/SetBuildJreOnly
/SetUpdatesUrl
/ImportRegFile
/NewPrerequisite
/UpdatePrerequisite
/DelPrerequisite
/NewEnvironment
/DelEnvironment
/SetPackageType
/SetOutputType
/SetCurrentFeature
/NewFeature
/AddLanguage
/DelLanguage
/GenRegKeys
/GenRegLicense
/AddMsm
/DelMsm
/SetMsmName
/SetMsmId
/SetMsmGuid
/NewMspUpgraded
/NewMspTarget
/DelMspFamily
/DelMspUpgraded
/DelMspTarget
/NewPathVariable
/UpdatePathVariable
/DelPathVariable
/SetOutputLocation
/ImportVs
/SetIcon
/ListOsLc
/SetShortcutdir
/SetAppdir
/RegisterFont
/GenerateMIGuid
/NewUpdate
/SetUpdateDescription
/DeleteUpdate
/ImportXmlFile
/DeleteXmlFile
/AddService
/DeleteService
/SetComponentAttribute
/ImportRepack
/ImportMsi
/ImportMsm
/AddUpgradeCode
/DelUpgradeCode
/UpdateInstalledDetection
/GenerateReport
/AddOsLc
/DelOsLc
/NewDriver
/UpdateInstaller
/ImportAppV4x
/ImportIniFile
/DeleteIniFile
/ImportShortcut
/UpdateProperties
/UpdateDelAutoClose
/UpdateAddAutoClose
/AddUpdateReplacement
/AddUpdateDependency
/IgnoreValidators
/SetEula
set advinst="C:\Program Files (x86)\Caphyon\Advanced Installer 15.0.1\bin\x86\AdvancedInstaller.com"
set aip="myApp.aip"
set ver=2.2.1
set productcode={325CC66B-AFC9-4A10-B99E-CD972A411E08}
echo 修改产品版本为:%ver%
%advinst% /edit %aip% /SetVersion %ver%
echo 修改产品编码为:%productcode%
%advinst% /edit %aip% /SetProductCode -langid 2052 -guid %productcode%
echo 打包中..
%advinst% /rebuild %aip%
// 修改langid为2052、修改guid为%productcode%
%advinst% /edit %aip% /SetProductCode -langid 2052 -guid %productcode%
// 修改langid为2052、随机生成guid
%advinst% /edit %aip% /SetProductCode -langid 2052