我有一个第三方安装程序,我希望我的用户能够下载并作为我编写的应用程序的先决条件运行。安装程序可以采用允许被动安装的参数,在被动安装中,用户可以查看过程的进度,但不必与安装交互。
以前,我已经通过在WinRar中创建一个SFX文件来完成此行为。在WinRAR图形用户界面的选项中,您可以指定要在解压缩归档之后启动的文件,以及应用程序的参数。
有没有办法创建SFX文件并使用控制台设置这些自动执行属性?我正在尝试创建一个批处理文件来处理所有这些问题。
以下是我目前为止的批处理文件内容:
C:\Progra~1\WinRAR\rar a -m0 installer_archive.rar install_me.exe
C:\Progra~1\WinRAR\rar s installer_archive.rar installer_auto_extractor.exe在最后一步之后,我应该听到什么来更新SFX?
发布于 2011-05-03 15:50:31
简单的方法是这样的:
rar a -r -sfx -z"f:\xfs.conf" auto_install install_me.exe它会自动在windows.And中创建auto_install.exe,您需要为sfx配置创建一个xfs.conf文件;我的示例如下:
; The path to the setup executable
Setup=install_me.exe
; Extract the files to a temporary directory
TempMode
; Use semi-silent mode
Silent=1
; Overwrite any existing files
Overwrite=1
; The title of the SFX archive
Title=Running
; The text to show initially when the user clicks on the SFX archive (will only matter if using Silent=0)
Text
{
The book is preparing to start.
}如果你还有问题,请告诉我。
https://stackoverflow.com/questions/5183621
复制相似问题