Silent Install / Uninstall

本文详细介绍了如何利用InstallShield Silent功能自动化安装LanSafe软件,无需用户干预。通过运行带有特定参数的Setup.exe,可以创建响应文件记录安装输入,进而实现无交互安装过程。同时提供了在DOS窗口中创建和使用响应文件的步骤,并讨论了可能出现的错误及解决方法。

 


The LanSafe Setup for Windows takes advantage of the InstallShield Silent function to facilitate automated, unattended installation of LanSafe. With InstallShield Silent, there is no need for a user to monitor the setup and provide input via dialog boxes. An InstallShield Silent setup runs on its own, without any end-user intervention.

A normal (non-silent) setup receives the necessary input from the user in the form of responses to dialog boxes. However, a silent setup does not prompt the user for input, it gathers setup data from the InstallShield Silent response file (.iss file).

A response file contains information similar to what an end user would enter as responses to dialog boxes when running a normal setup. InstallShield Silent reads the necessary input from the response file at run time. The format of response files resembles that of an .ini file, but response files have .iss extensions. A response file is a plain text file consisting of sections containing data entries. The best way to create an InstallShield Silent response file is to run the setup and have InstallShield automatically record and create the response file. If necessary, the response file can be manually edited after it is created.

Note

All passwords are saved in human readable form in the recorded silent setup file.

Command line switches for Setup.exe

/f1<path\ResponseFile> or -f1<path\ResponseFile>

Specifies an alternate location and name of the response file (.iss file). If this option is used when running InstallShield Silent, the response file is read from the folder/file specified by<path\ResponseFile>. If this option is used along with the -r option, the response file is written to the folder/file specified by<path\ResponseFile>.

/f2<path\LogFile> or -f2<path\LogFile>

Specifies an alternate location and name of the log file created by InstallShield Silent. By default, Setup.log log file is created and stored in the same directory as that of Setup.inx.

/r or -r

Causes Setup.exe automatically to generate a silent setup file (.iss file), which is a record of the setup input, in the Windows folder.

/s or -s

Runs InstallShield Silent to execute a silent setup.

Note

Separate multiple command line switches with a space, but do not put a space inside a command line switch (for example, /r /f1Install.iss is valid, but not /r/f1 Install.iss).

When using long path and filename expressions with switches, enclose the expressions in double quotation marks. The enclosing double quotes tell the operating system that spaces within the quotation marks are not to be treated as command line delimiters.

Create a response file

  1. Open a DOS window (Command Prompt).
  2. Type the directory path of the LanSafe Setup.exe. If spaces appear in the path, place quotes around the path. For example:
    "C:\LanSafe Installer\Setup.exe"
  3. Type a space, then type the command line switches to use. For example:
    "C:\LanSafe Installer\Setup.exe" -r -f1C:\LanSafeSilentFile.iss
    The above switches record a silent setup file to the file C:\LanSafeSilentFile.iss
  4. Press Enter.
    The Setup program runs.
  5. Complete the installation or uninstallation process as you normally would.
    All responses are recorded for use when Setup is run silently.

After the file is recorded, you can verify your responses by viewing the silent setup file in Notepad or Wordpad.

Install with the silent option

  1. Open a DOS window (Command Prompt).
  2. Type the directory path of the LanSafe Setup.exe. If spaces appear in the path, place quotes around the path. For example:
    "C:\LanSafe Installer\Setup.exe"
  3. Type a space, then type the command line switches to use. For example:
    "C:\LanSafe Installer\Setup.exe" -s -f1C:\LanSafeSilentFile.iss
    The above switches read a silent setup file at the location C:\LanSafeSilentFile.iss
  4. Press Enter.
    Setup runs silently without asking for user feedback.
  5. Verify the process was completed properly. For example, if you used Setup to install LanSafe, be sure LanSafe is running properly.

Note

A Setup run in silent mode uses the same settings as the Setup you ran through to create the response file. Essentially, you are creating clone installations.

Troubleshooting errors

Setup.log is the default name for the silent setup log file that contains the results of the last run of a silent setup. This file is saved in the same location as the recorded .iss file. The result code shown in the file is one of the following:

0 Success.

-1 General error.

-2 Invalid mode.

-3 Required data not found in the Setup.iss file.

-4 Not enough memory available.

-5 File does not exist.

-6 Cannot write to the response file.

-7 Unable to write to the log file.

-8 Invalid path to the InstallShield Silent response file.

-9 Not a valid list type (string or number).

-10 Data type is invalid.

-11 Unknown error during setup.

-12 Dialog boxes are out of order.

-51 Cannot create the specified folder.

-52 Cannot access the specified file or folder.

-53 Invalid option selected.

Usually, errors occur because a specified command line switch is invalid or the .iss file has been manually edited incorrectly.

# ====================== 自定义宏 产品信息============================== !define PRODUCT_NAME "BotAgent" !define PRODUCT_PATHNAME "WillingBotAgent_PC" #安装卸载项用到的KEY !define INSTALL_APPEND_PATH "WillingBotAgent" #安装路径追加的名称 !define INSTALL_DEFALT_SETUPPATH "" #默认生成的安装路径 !define EXE_NAME "WillingBotAgent.exe" !define PRODUCT_VERSION "4.0.0.0" !define PRODUCT_PUBLISHER "武汉慧灵控科技有限公司" !define PRODUCT_LEGAL "武汉慧灵控科技有限公司 Copyright(c)2017" !define INSTALL_OUTPUT_NAME "Test.exe" # ====================== 自定义宏 安装信息============================== !define INSTALL_7Z_PATH "..\app.7z" !define INSTALL_7Z_NAME "app.7z" !define INSTALL_RES_PATH "skin.zip" !define INSTALL_LICENCE_FILENAME "licence.rtf" !define INSTALL_ICO "logo.ico" !define UNINSTALL_ICO "uninst.ico" #SetCompressor lzma !include "ui_nim_setup.nsh" # ==================== NSIS属性 ================================ # 针对Vista和win7 的UAC进行权限请求. # RequestExecutionLevel none|user|highest|admin RequestExecutionLevel admin ; 安装包名字. Name "${PRODUCT_NAME}" # 安装程序文件名. OutFile "..\..\Output\${INSTALL_OUTPUT_NAME}" ;$PROGRAMFILES32\Netease\NIM\ InstallDir "$PROGRAMFILES64" # uncomment the following line to make the installer silent by default. SilentInstall silent # 安装和卸载程序图标 Icon "${INSTALL_ICO}" UninstallIcon "${UNINSTALL_ICO}" 这段脚本代码有什么作用
03-14
VMware Install Cleaner 是一款由 VMware 官方提供的专用工具,旨在帮助用户彻底清理 VMware 在操作系统中的安装痕迹,包括安装文件、注册表条目以及相关配置信息等[^3]。这款工具特别适用于在重装或者完全移除 VMware 时,确保系统中没有残留文件,从而避免可能的冲突或错误。 ### 下载与使用指南 #### 下载地址 - **官方下载**:为了确保获取最新版本并保证安全性,建议从 [VMware 官方网站](https://www.vmware.com/support/uninstall-tools.html) 下载 VMware Install Cleaner(`VMware_Install_Cleaner.exe`)。 - **第三方资源**:尽管某些第三方平台也可能提供此工具,但出于安全性和兼容性的考虑,强烈推荐始终使用官方来源进行下载。 #### 系统要求和兼容性 - 确保你的操作系统版本与 `VMware_Install_Cleaner.exe` 支持的版本一致。目前该工具主要支持 Windows 操作系统,不适用于 Ubuntu 或其他 Linux 发行版[^4]。 - 以管理员权限运行工具可以确保它能访问系统中所有需要清理的部分[^2]。 #### 使用步骤 1. **下载安装**:访问 VMware 官网下载 `VMware_Install_Cleaner.exe`,保存至易于访问的文件夹。 2. **以管理员身份运行**:右键点击该文件并选择“以管理员身份运行”,确保有足够的权限来进行清理。 3. **同意用户协议**:运行工具后,首先会看到用户协议,阅读后同意继续。 4. **执行扫描**:同意协议后,工具会自动开始扫描系统中与 VMware 相关的残留文件。 5. **完成扫描**:扫描完成后,工具会列出所有找到的相关项。用户需要检查列表以确认是否包括不应被清理的项目。 6. **开始清理**:确认无误后,选择“清理”按钮,等待工具执行清理过程,并按照提示重启计算机[^2]。 #### 注意事项 - **备份数据**:尽管 VMware Install Cleaner 是由 VMware 官方提供,运行前备份重要数据仍然十分重要,以防不可预见的问题。 - **卸载 VMware**:在运行清理工具之前,应先从系统中卸载 VMware 相关软件,以免清理过程中出现干扰。 ### 示例命令行操作(可选) 如果你更倾向于使用命令行,可以通过以下方式调用 `VMware_Install_Cleaner.exe` 进行静默扫描和清理: ```bash VMware_Install_Cleaner.exe /silent ``` > **注意**:这种方式不会显示任何界面,因此务必提前做好数据备份,并了解其潜在风险。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值