Silent Install / Uninstall
Silent Install / Uninstall
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
- Open a DOS window (Command Prompt).
- 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" - 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 - Press Enter.
The Setup program runs. - 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
- Open a DOS window (Command Prompt).
- 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" - 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 - Press Enter.
Setup runs silently without asking for user feedback. - 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.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 25岁的心里话
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现