OCSetup can be called only on a running Windows® operating system. OCSetup installs and removes system Microsoft® Windows Installer components. It can also be used to pass packages to Deployment Image Servicing and Management (DISM.exe) for installation or removal, or to call the Windows Installer service MSIExec.exe.
OCSetup cannot use a path to determine the location of the system Windows Installer or package. System Windows Installers must be staged before installation. The path for packages must be specified in the servicing section of an unattended installation answer file.
To install language packs online, use DISM or the Language Pack Setup tool (Lpksetup.exe). For more information, see Add a Language Pack Online.
For more information about OCSetup command-line options, see OCSetup Command-Line Options.
You must install the latest version of the Windows OEM Preinstallation Kit (Windows OPK), which contains all of the necessary tools, including Windows System Image Manager (Windows SIM).
Install or Remove System Windows Installers or Packages Online
Before running OCSetup at a command prompt, set the command prompt to run as an administrator (even if you are logged on as administrator on the computer). To do this, perform the following procedure.
- Click Start, point to All Programs, and then
- Right-click Command Prompt, and then click Run as
To install or remove Windows Installers or packages
- Copy the out-of-box system Windows Installer or package to
the local hard drive.
- If you are installing a package, then create an answer file in
Windows SIM with the desired packages in the servicing
For details on how to do this, see Add a Package to an Answer File.
- Validate the answer file and save it.
- At a command prompt, run the following command.
start /w ocsetup Windows Installer or package name /unattendfile:path to answer file