Video Screencast Help
Scheduled Maintenance: Symantec Connect is scheduled to be down Saturday, April 19 from 10am to 2pm Pacific Standard Time (GMT: 5pm to 9pm) for server migration and upgrade.
Please accept our apologies in advance for any inconvenience this might cause.

Unused the CommandLine property in Prepare for Image Task.

Created: 10 Feb 2012 • Updated: 16 Feb 2012 | 5 comments
This issue has been solved. See solution.

Hi All,

Using the Prepare for Image Task I found that this task has CommandLine property which is used to initialize the sysprep settings and pass them to Client Agent handler. I've created a custom task and inherided from existing PreImage Task to get an access to CommandLine property from the configuration page. I was able to pass the command line and initialize the configuration file (you can see the config file below) but the sysprep runs without my commands. It looks strange that we do not have possibility to set up the command line and use it when the sysprep file runs. 

Can you guys tell me is it possible to use this property or not? I will be glad to get any answers on my question.

 

Thanks,

Alexey

Configuration File:

<task guid="4c8848ae-0c78-4197-90a7-0b5e2c7147a6">

  <name>Create Image_PrepareImage</name>
  <description />
  <agents>
    <agent platform=".NETCLR Client Task Server" agentId="TaskServerHandler.TaskHandlers.PrepareImageTaskHandler, TaskServerHandler, Version=X.X.X.X, Culture=neutral, PublicKeyToken=6d9a5987cd33ce68" />
    <agent platform="Win32" agentId="DeploymentSolutionAgent_Task" />
    <agent platform="Unix" agentId="DeploymentSolutionAgent_Task" />
  </agents>
  <handlerXml>
    <image>
      <DomainCredential guid="@DomainCredentials">@DomainCredentialXML</DomainCredential>
      <answerFile>
        <fileType>Windows XP Professional</fileType>
        <defaultFile>True</defaultFile>
        <fileContent>
        </fileContent>
      </answerFile>
      <sysprep>
        <commandLine>-generalize -audit -quiet -reboot</commandLine>
        <OSType>SOME S/N</OSType>
      </sysprep>
      <shutdown>
        <reboot>Automation</reboot>
        <SBSIPList>192.168.160.61</SBSIPList>
      </shutdown>
    </image>
  </handlerXml>
  <advanced>
    <remoteExecAdvanced>
      <priority value="Normal" compatibility="Exclusive" />
      <kill enforce="True" maxMinutes="960" />
      <platform configuredProviderGuid="00000000-0000-0000-0000-000000000000" />
    </remoteExecAdvanced>
  </advanced>
</task>

Comments 5 CommentsJump to latest comment

sushrut sane's picture

Hi,

No, By design there is no provision made to use command line property for Prepare for Image Task.

If you want to use command line property, you can use NS script task.

Thank you.

Alexey-Art's picture

Hi Shane,

Thank you for you answer. Can you please provide me more information about how can I use the CommandLine property using NS script task and command line format too?

Does the Deployment Solution Agent use this parameter when run PreImage task or not?

Note Although I have created my task based on PreImage and implemented my configuration settings page to initialize the CommandLine property they are not applied when the sysprep.exe file runs on target PC.

     <sysprep>

        <commandLine>-generalize -audit -quiet -reboot</commandLine>
        <OSType>SOME S/N</OSType>
      </sysprep>

Thanks,

Alexey

Alexey-Art's picture

Hi Shane,

Thank you for you answer. Can you please provide me more information about how can I use the CommandLine property using NS script task and command line format too?

Does the Deployment Solution Agent use this parameter when run PreImage task or not?

Note Although I have created my task based on PreImage and implemented my configuration settings page to initialize the CommandLine property they are not applied when the sysprep.exe file runs on target PC.

      <sysprep>

        <commandLine>-generalize -audit -quiet -reboot</commandLine>
        <OSType>SOME S/N</OSType>
      </sysprep>

Thanks,

Alexey

sushrut sane's picture

Hi,

Create NS Script task and select Script  type as command script. Type the command you want to execute and run the task.

No, Deployment Solution Agent does not use this parameter when run PreImage task.

Thank you.

SOLUTION