How to execute the RunOnce and RunOnceEx registry keys from an ON Command CCM script

Article:TECH108407  |  Created: 2002-01-11  |  Updated: 2005-01-04  |  Article URL http://www.symantec.com/docs/TECH108407
Article Type
Technical Solution

Issue



During script execution, the RunOnce and RunOnceEx registry keys are temporarily disabled. This is done to keep the smeclnt profile clean and to avoid conflicts between other applications and any planned installation. However, in some cases you may need to enable those keys for the installation to complete successfully.

This document explains how to enable execution of the RunOnce and RunOnceEx registry keys within an ON Command CCM script.


Solution



To execute commands from the RunOnce and RunOnceEx registry keys, use the file Ronce.bat in your script.

To use Ronce.bat
  1. Download the Ronce.zip file.
  2. Unzip the Ronce.bat file to your script folder.
  3. Call Ronce.bat from your script using the "get" command before executing the first reboot command.
    This moves the RunOnce and RunOnceEx registry keys to a temporary location.
  4. After the reboot, call Ronce.bat a second time by using the "run" command.
    This executes the commands that were moved from the RunOnce and RunOnceEx registry keys before the reboot.
    Example usage within a script

    wininter install.if -r "setup.exe"
    call ronce.bat get
    reboot 1
    :reboot1
    call ronce.bat run




Technical Information
Command-line switches
getSaves the registry values into a temporary folder and deletes the contents of the registry-keys.

Use this after the execution of a setup, but before executing the "reboot n" command.
runImports the registry values from the temporary folder back into the registry and runs the commands as they would run when a user logs in.

Use this after the reboot command to execute the configuration commands that are required by the setup program.




Legacy ID



2002111105125260


Article URL http://www.symantec.com/docs/TECH108407


Terms of use for this information are found in Legal Notices