Home Print Show Topic URL Previous Next
IT Management Suite
Client Management Suite
Server Management Suite
Deployment Solution
Asset Management Suite

Creating a task that toggles layers

Client Management Suite

After you install a newer version of Firefox, you must disable the old layer and activate the new one. To toggle layers at the next computer restart, you must change the Activate on system startup option. To do this remotely from the Symantec Management Console, create a new Run script task with the following command-line script:

SET exitcode=0

cd "%programfiles%\Symantec\Workspace Virtualization"

:: Check if layer is already activated

SVSCmd.exe firefox12 P -v | findstr /R /c:"Active on start:.*No"

goto %errorlevel%


echo not active

:: Deactivate new layer until next startup

SVSCmd.exe firefox12 D

:: Turn off autostart for old layer

SVSCmd.exe firefox11 AUTO -N

:: Turn on autostart for new layer

SVSCmd.exe firefox12 AUTO -Y

SET exitcode=%errorlevel%


echo active

:: For testing purposes sleep 10 seconds before closing the command window

ping -n 1 -w 10000 > nul

:: Exit

exit /b %exitcode%

This script uses the SVSCmd.exe command-line utility to modify settings. First, this script checks if the new layer exists and is already configured to activate on startup. The follow-up tasks in managed delivery policies always run, regardless of the compliance check results. This check is required to make sure the script does not run in case the managed delivery policy is executed again by mistake.

Then the script disables the autostart option for the firefox11 layer and enables it for the new firefox12 layer. When the computer is restarted, the firefox12 layer is activated.

For more information on the SVSCmd.exe command line parameters, see the Symantec Workspace Virtualization User Guide or run the SVSCmd.exe utility from the command-line prompt.

Do not run the Run script task after you create it. Instead, run it as part of the managed delivery policy in the next step of this tutorial.

This task is a step in the process for installing software into a virtual layer.

See Delivering a new version of software using Software Workspace Virtualization

To create a task that toggles layers

  1. In the Symantec Management Console, on the Manage menu, click Jobs and Tasks.

  2. In the left pane, right-click any folder, and then click New > Task.

    For example, right-click System Jobs and Tasks.

  3. In the Create New Task dialog box, in the left pane, click Run Script.

  4. In the right pane, type a name for the task.

    For example, type Toggle layers.

  5. Under Script Details, in the Script type drop-down list, click Command Script, and then copy and paste the script sample from this topic into the text box.

  6. Click OK.