zoukankan      html  css  js  c++  java
  • InstallShield 静默安装

    静止方式 静默方式 slient mode 安静安装 无提示安装

      use cmdline :录制静默安装文件
          cmd
            f:
            cd F:\领秀打包\LEADSHOWEdit 3.0.0\Media\Default\Disk Images\Disk1
            copy "LEADSHOW 3.0.0.exe" LEADSHOW.exe
            setup.exe -r -f1 "C:\setup.iss"
            打开C:\Windows目录, 然后找到setup.iss文件,把这个文件和你将要静默安装的程序setup.exe保存在同一个目录中
           start /wait setup.exe /s /f1"F:\领秀打包\LEADSHOWEdit 3.0.0\Media\Default\Disk Images\Disk1\setup.iss" /f2"C:\setup.log"(下句和本句等效)
           setup.exe -s -f1"F:\领秀打包\LEADSHOWEdit 3.0.0\Media\Default\Disk Images\Disk1\setup.iss"(本句和上句等效)

          由此看出

          1、如果要由外部程序调用静默安装还需要同时把 setup.iss 打包进去

          2、由此可见installshield 的打包程序可以支持命令行,具体命令行可以参见

          3、InstallShield打包的setup文件命令行参数  http://hi.baidu.com/duorw/blog/item/a66fdb221ae65548ac34de66.html

          4、具体详细还可看InstallShield帮助文档中的《Setup usage examples》

    http://www.cr173.com/html/6002_1.html

    一些常用软件静默安装参数(nsis,msi,InstallShield ,Inno)

    http://blog.csdn.net/mejy/archive/2007/06/13/1650227.aspx

    最近发现以前做的一个安装程序,静默安装时还是有个初始化界面,不合要求。于是上网找方法。原来可以这么搞,省的我改代码了。

    以下的为 InstallShield 编译后的打包程序

    先用setup.exe -r录制一个安装脚本,录制完成后 脚本文件setup.iss会放在C:\windows下面

    将这个拷贝出来和setup.exe放在一个目录下面。

    再次运行setup.exe /s /f1就可以了 /f1是指定脚本文件的目录,在同一个目录下就不用指定了。

    http://www.cnblogs.com/sun-li/archive/2010/01/18/1650864.html

    InstallShield 静默安装
    InstallScrip工程

    1. 在命令行窗口中使用 -R 参数(即record) 运行安装程序。

    例如:
     Setup.exe -R
     or  Setup.exe -r -f1"c:\setup.iss" //-f1:指定iss文件输出路径

    2. 正常安装,在安装结束后不能选择“立刻重启动计算机”的选项
        批处理文件中的其他命令能会因为计算机重启而无法执行

    3. 在安装程序运行完毕后,打开C:\Windows目录

     然后找到setup.iss文件,把这个文件和你将要静默安装的程序setup.exe保存在同一个目录中

    4. 用以下命令进行静默安装:

     start /wait setup.exe /s /f1"C:\setup.iss" /f2"c:\setup.log" //f1:输入路径,f2:输出路径


    如果从只读权限目录下直接执行Setup.exe,应用程序安装将会失败,因为必须指定用于保存日志文件的路径:
      Setup.exe -s -f2"%systemdrive%\setup.log"

    删除setup.log文件:
      DEL "%systemroot%\setup.log"

     解决self-extracting executable静默安装失败

      (log文件内容:[ResponseResult]ResultCode=-5  即file does not exist):

    方法1.setup.exe -s -f1"path to the response file " //指定iss文件路径.

    方法2.Add the response file (即iss文件) to the Disk1 folder under Advanced Files in the Support Files/Billboards view.

      然后build即可.

       此方法是直接把iss文件打包到exe里,来解决无法找到response file问题.需要静默安装时只需cmd下:setup.exe -s即完成,已不需要自己生成response file.

    因为iss文件已打包进去,所以用户无法自定义安装过程,只能按照打包的iss文件执行,存在一定的问题.如果有朋友找到更好的方法,希望能分享下!

    P.S.

    To run the setup remotely you must launch Setup.exe with the -SMS switch.
    setup -s -f1c:\windows\setup.iss -SMS

    Silent Installations //IS Helper

    /p : Specify password (Basic MSI and InstallScript MSI projects)
    If you selected the Password Protect Setup.exe option in the Release Wizard for your release, the user must specify the password with the /p option at run time. A typical command is Setup.exe /s /p"password".

    /r : Record mode (InstallScript and InstallScript MSI projects)
    In order to run an InstallScript MSI or InstallScript project installation program in silent mode, you must first run Setup.exe with the /r option to generate a response file, which stores information about the data entered and options selected by the user at run time.

    Running an InstallScript MSI or InstallScript installation program with the command Setup.exe /r displays all the run-time dialog boxes, and stores the data in a file called Setup.iss, created inside the system's Windows folder. To specify an alternative response file name and location, use the /f1 option, described below.

    Basic MSI projects do not create or use a response file for silent installations.

    /s : Silent mode
    For an InstallScript MSI or InstallScript project, the command Setup.exe /s runs the installation in silent mode, by default based on the responses contained in a response file called Setup.iss in the same directory. (Response files are created by running Setup.exe with the /r option.) To specify an alternative file name or location of the response file, use the /f1 option, described below.

    The command Setup.exe /s also suppresses the Setup.exe initialization window for a Basic MSI installation program, but it does not read a response file. To run a Basic MSI product silently, run the command line Setup.exe /s /v/qn. (To specify the values of public properties for a silent Basic MSI installation, you can use a command such as Setup.exe /s /v"/qn INSTALLDIR=D:\Destination".)

    /f1 : Specify alternative response file name and path (InstallScript and InstallScript MSI projects)
    Using the /f1 option enables you to specify where the response file is (or where it should be created) and what its name is, as in Setup.exe /s /f1"C:\Temp\Setup.iss". Specify an absolute path; using a relative path gives unpredictable results. The /f1 option is available both when creating a response file (with the /r option) and when using a response file (with the /s option).

    /f2 : Specify alternative log file name and path (InstallScript and InstallScript MSI projects)
    When running an InstallScript MSI or InstallScript installation in silent mode (using the /s option), the log file Setup.log is by default created in the same directory and with the same name (except for the extension) as the response file. The /f2 option enables you to specify an alternative log file location and file name, as in Setup.exe /s /f2"C:\Setup.log". Specify an absolute path; using a relative path gives unpredictable results.

    setup.iss文件示例:

    [InstallShield Silent]
    Version=v7.00
    File=Response File
    [File Transfer]
    OverwrittenReadOnly=NoToAll
    [{3E4054C0-3882-46A5-B9DD-E546DB188E20}-DlgOrder]
    Dlg0={3E4054C0-3882-46A5-B9DD-E546DB188E20}-SdWelcome-0
    Count=5
    Dlg1={3E4054C0-3882-46A5-B9DD-E546DB188E20}-SdLicense2Rtf-0
    Dlg2={3E4054C0-3882-46A5-B9DD-E546DB188E20}-SdAskDestPath2-0
    Dlg3={3E4054C0-3882-46A5-B9DD-E546DB188E20}-SdStartCopy2-0
    Dlg4={3E4054C0-3882-46A5-B9DD-E546DB188E20}-SdFinishReboot-0
    [{3E4054C0-3882-46A5-B9DD-E546DB188E20}-SdWelcome-0]
    Result=1
    [{3E4054C0-3882-46A5-B9DD-E546DB188E20}-SdLicense2Rtf-0]
    Result=1
    [{3E4054C0-3882-46A5-B9DD-E546DB188E20}-SdAskDestPath2-0]
    szDir=C:\Program Files\Nationz\DPS
    Result=1
    [{3E4054C0-3882-46A5-B9DD-E546DB188E20}-SdStartCopy2-0]
    Result=1
    [Application]
    Name=TCM DPS
    Version=1.0.19
    Company=

    Lang=0804
    [{3E4054C0-3882-46A5-B9DD-E546DB188E20}-SdFinishReboot-0]
    Result=6
    BootOption=3


    本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/carl2380/archive/2010/10/10/5931965.aspx

  • 相关阅读:
    [程序员代码面试指南]栈和队列-单调栈结构(单调栈)
    快学Scala第一部分
    Add Digits
    Nim Game
    将分布式中多台节点的日志信息集中到一个节点上
    Eclipse调试的一些小技巧
    Maven的常用命令
    Eclipse插件本地扩展安装
    Spark应用程序的运行框架
    Spark运行各个时间段的解释
  • 原文地址:https://www.cnblogs.com/carl2380/p/2093402.html
Copyright © 2011-2022 走看看