Export (0) Print
Expand All
Expand Minimize

Add Post-Initial Configuration Customizations (PostIC.cmd) - Windows Server Essentials

Published: July 9, 2012

Updated: October 20, 2013

Applies To: Windows Server 2012 R2 Essentials

Add post-initial configuration customizations by writing your own code, and then calling that code from a script file named PostIC.cmd. When using the PostIC.cmd file, you must adhere to the following guidelines:

  • Your customization code must run silently (it cannot display a User Interface).

  • Your customization code cannot initiate a restart of the server. The Initial Configuration will restart the server as the last task.

  • Your customization code must run in three minutes or less.

  • Define your PostIC.cmd file to return a 0 if the code runs successfully. If any other value is returned, the operating system looks for a file named SetupFailure.cmd, which contains code that should be run if the code in the PostIC.cmd file does not run successfully.

  • Both the PostIC.cmd file and the SetupFailure.cmd file must be located C:\Windows\Setup\Scripts.

  1. Write the code that is called from the PostIC.cmd script.

  2. Using Notepad, create a file called PostIC.cmd and add the call to the code that you created in step 1. Ensure that your code returns a success value.

  3. Save PostIC.cmd in C:\Windows\Setup\Scripts.

  4. (Optional) Create a SetupFailure.cmd file which runs code if PostIC.cmd returns anything other than 0.

You can provide notification of problems in Initial Configuration by using the SetupFailure.cmd. The SetupFailure.cmd file contains the code that you want to run if problems occur. The SetupFailure.cmd file is placed in C:\Windows\Setup\Scripts and is run when either a problem occurs with a setup task or when the PostIC.cmd file returns a value other than 0.

  1. Write the code that is called from the SetupFailure.cmd script.

  2. Using Notepad, create a file called SetupFailure.cmd and add the call to the code that you created in step 1. Ensure that your code returns a success value.

  3. Save SetupFailure.cmd in C:\Windows\Setup\Scripts.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft