OCSetup 可以从Windows Automated Installation Kit下载得到,要使用到的命令如下:
Windows 功能 命令行名称 描述
Services for NFS ServicesForNFS-ClientOnly Network File System is a protocol developed by the Internet Engineering Task Force (IETF).
Games InboxGames Games that ship with the operating system.
Internet Information Services IIS-WebServerRole Web server that provides a Web application infrastructure for all versions of Windows.
Subsystem for UNIX-based Applications SUA Provides compatibility with UNIX-based applications.
Telnet Client TelnetClient Client for the terminal emulation program for TCP/IP networks.
Telnet Server TelnetServer Server for the terminal emulation program for TCP/IP networks.
TFTP Client TFTP Simple form of FTP with no security features.
ocsetup.exe[/?] [/h] [/help] component [/log:file] [/norestart] [/passive] [/quiet] [/unattendfile:file] [/uninstall] [/x: parameter]
参数 描述
/?, /h, /help
Displays help for all options when run with or without options.
component
The name of the component to be installed or uninstalled. The component name is case-sensitive.
/log: file
Specifies a non-default log file location.
/norestart
The computer is not rebooted even if required after component installation.
/passive
Unattended mode. Progress only.
/quiet
Quiet mode. No user interaction.
/unattendfile: file
The file contains overrides or additions to default configuration settings. Implies passive mode.
/uninstall
Uninstalls the component. Installation is default.
/x: parameter
Additional configuration parameters to be applied when installing a component.
例子: OCSetup IIS-WebServerRole /Log:%temp%IIS.log /norestart /quiet
运行时没有UI界面,可能会有些慢,需要耐心等待。同样,这个方法也可以运用到Windows Longhorn Server的角色上
本文来源:西部E网 作者:佚名