none
Task Sequence de Command Line não executa RRS feed

  • Pergunta

  • Srs.,

    Incluí dois itens em minha task sequence de deploy de sistema operacional, após reboot do computador inclui uma task de tipo "command line" aonde quero que ele rode o comando "ipconfig /flushdns" e outro "gpupdate /force", cada uma como um item de command line separado. Também crei uma outra aonde chamo um script que altera a letra da unidade secundária do disco da máquina, esta também não funciona.

    O problema é que quando ele vai executar ele simplesmente dá um erro e não faz, analisando o log SMSTS.log encontrei o erro :

    =======================[ smsswd.exe ] ======================= PackageID = '' BaseVar   = '', ContinueOnError='' SwdAction = '0001' TS::Utility::IsWinPE()==false, HRESULT=80004005 (e:\nts_sms_fre\sms\client\osdeployment\installsoftware\runcommandline.cpp,302) cmd.Execute(pszPkgID, sProgramName, dwCmdLineExitCode), HRESULT=80004005 (e:\nts_sms_fre\sms\client\osdeployment\installsoftware\main.cpp,385) running a command line under a user account is not supported in WinPE Install Software failed to runcommand line, hr=0x80004005

    Dentro da Task o parâmetro do command line passado é "ipconfig /flushdns" ou "gpupdate /force", opção "Start in" está como "C:\" e mandei executar com uma conta de domínio que tem privilégios.

    Outro Log abaixo:

    

    Parsing step node: Executa comando IPCONFIG    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Description:     TSManager    12/03/2015 16:13:41    652 (0x028C)
    ContinueOnError:     TSManager    12/03/2015 16:13:41    652 (0x028C)
    SuccessCodeList: 0 3010    TSManager    12/03/2015 16:13:41    652 (0x028C)
    (__hrMethodRetVal == ((HRESULT)0L)) || (bFailIfMissing == false), HRESULT=80070002 (e:\nts_sms_fre\SMS\common\inc\ccmxml.h,566)    TSManager    12/03/2015 16:13:41    652 (0x028C)
    No condition is associated with the step.    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Disable:     TSManager    12/03/2015 16:13:41    652 (0x028C)
    Start in dir:     TSManager    12/03/2015 16:13:41    652 (0x028C)
    Run in attribute: WinPEandFullOS    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Timeout:     TSManager    12/03/2015 16:13:41    652 (0x028C)
    DefaultVarlist found    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Variable name: SMSTSDisableWow64Redirection    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Variable name: _SMSTSRunCommandLineAsUser    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Variable name: SMSTSRunCommandLineUserName    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Variable name: SMSTSRunCommandLineUserPassword    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Variable name: WorkingDirectory    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Action command line: smsswd.exe /run: ipconfig /flushdns    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Adding instruction at 14    TSManager    12/03/2015 16:13:41    652 (0x028C)

    Parsing step node: Executa GPUPDATE    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Description:     TSManager    12/03/2015 16:13:41    652 (0x028C)
    ContinueOnError:     TSManager    12/03/2015 16:13:41    652 (0x028C)
    SuccessCodeList: 0 3010    TSManager    12/03/2015 16:13:41    652 (0x028C)
    (__hrMethodRetVal == ((HRESULT)0L)) || (bFailIfMissing == false), HRESULT=80070002 (e:\nts_sms_fre\SMS\common\inc\ccmxml.h,566)    TSManager    12/03/2015 16:13:41    652 (0x028C)
    No condition is associated with the step.    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Disable:     TSManager    12/03/2015 16:13:41    652 (0x028C)
    Start in dir:     TSManager    12/03/2015 16:13:41    652 (0x028C)
    Run in attribute: WinPEandFullOS    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Timeout:     TSManager    12/03/2015 16:13:41    652 (0x028C)
    DefaultVarlist found    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Variable name: SMSTSDisableWow64Redirection    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Variable name: _SMSTSRunCommandLineAsUser    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Variable name: SMSTSRunCommandLineUserName    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Variable name: SMSTSRunCommandLineUserPassword    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Variable name: WorkingDirectory    TSManager    12/03/2015 16:13:41    652 (0x028C)
    Action command line: smsswd.exe /run: gpupdate /force    TSManager    12/03/2015 16:13:41    652 (0x028C)

    Expand a string: WinPEandFullOS    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Executing command line: smsswd.exe /run: ipconfig /flushdns    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    =======================[ smsswd.exe ] =======================    InstallSoftware    12/03/2015 16:16:42    1992 (0x07C8)
    PackageID = ''    InstallSoftware    12/03/2015 16:16:42    1992 (0x07C8)
    BaseVar   = '', ContinueOnError=''    InstallSoftware    12/03/2015 16:16:42    1992 (0x07C8)
    SwdAction = '0001'    InstallSoftware    12/03/2015 16:16:42    1992 (0x07C8)
    TS::Utility::IsWinPE()==false, HRESULT=80004005 (e:\nts_sms_fre\sms\client\osdeployment\installsoftware\runcommandline.cpp,302)    InstallSoftware    12/03/2015 16:16:42    1992 (0x07C8)
    running a command line under a user account is not supported in WinPE    InstallSoftware    12/03/2015 16:16:42    1992 (0x07C8)
    cmd.Execute(pszPkgID, sProgramName, dwCmdLineExitCode), HRESULT=80004005 (e:\nts_sms_fre\sms\client\osdeployment\installsoftware\main.cpp,385)    InstallSoftware    12/03/2015 16:16:42    1992 (0x07C8)
    Install Software failed to run command line, hr=0x80004005    InstallSoftware    12/03/2015 16:16:42    1992 (0x07C8)
    Process completed with exit code 2147500037    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    !--------------------------------------------------------------------------------------------!    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Failed to run the action: Executa comando IPCONFIG.
    Unknown error (Error: 80004005; Source: Unknown)    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Sending status message . . .    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Send a task execution status message SMS_TSExecution_ActionFailError    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    MP server CNBBOSCCM.xyz.COM.BR and port 80. SSL=false. CRL=false.    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Site code: RBO    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Client machine name: VE0077W7    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Client Identity: GUID:EB0D7102-B9B9-4D0C-9A58-C481F08DF5E2    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Advertisement ID: RBO200E5    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Package ID: RBO00165    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Sending StatusMessage    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Formatted header:    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    <Msg SchemaVersion="1.1" ReplyCompression="zlib"><ID/><SourceID>FA38A3D4-F715-4F1A-9C06-16B67CB68936</SourceID><SourceHost/><TargetAddress>mp:[http]MP_StatusManager</TargetAddress><ReplyTo>direct:OSD</ReplyTo><Priority>3</Priority><Timeout>3600</Timeout><SentTime>2015-03-12T19:16:42Z</SentTime><Protocol>http</Protocol><Body Type="ByteRange" Offset="0" Length="3286"/><Hooks/><Payload Type="inline"/><TargetHost/><TargetEndpoint>StatusReceiver</TargetEndpoint><ReplyMode>Sync</ReplyMode><CorrelationID/></Msg>
        TSManager    12/03/2015 16:16:42    1920 (0x0780)
    CLibSMSMessageWinHttpTransport::Send: URL: CNBBOSCCM.xyz.COM.BR:80  CCM_POST /ccm_system/request    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    The request has succeeded. 200 OK    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Set a global environment variable _SMSTSLastActionRetCode=-2147467259    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Set a global environment variable _SMSTSLastActionSucceeded=false    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Clear local default environment    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Let the parent group (Setup Operating System) decides whether to continue execution    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    The execution of the group (Setup Operating System) has failed and the execution has been aborted. An action failed.
    Unknown error (Error: 80004004; Source: Unknown)    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Failed to run the last action: Executa comando IPCONFIG. Execution of task sequence failed.
    Unknown error (Error: 80004005; Source: Unknown)    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Sending status message . . .    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Send a task execution status message SMS_TSExecution_TaskSequenceFailError    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    MP server CNBBOSCCM.xyz.COM.BR and port 80. SSL=false. CRL=false.    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Site code: RBO    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Client machine name: VE0077W7    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Client Identity: GUID:EB0D7102-B9B9-4D0C-9A58-C481F08DF5E2    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Advertisement ID: RBO200E5    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Package ID: RBO00165    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Sending StatusMessage    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Formatted header:    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    <Msg SchemaVersion="1.1" ReplyCompression="zlib"><ID/><SourceID>FA38A3D4-F715-4F1A-9C06-16B67CB68936</SourceID><SourceHost/><TargetAddress>mp:[http]MP_StatusManager</TargetAddress><ReplyTo>direct:OSD</ReplyTo><Priority>3</Priority><Timeout>3600</Timeout><SentTime>2015-03-12T19:16:42Z</SentTime><Protocol>http</Protocol><Body Type="ByteRange" Offset="0" Length="2128"/><Hooks/><Payload Type="inline"/><TargetHost/><TargetEndpoint>StatusReceiver</TargetEndpoint><ReplyMode>Sync</ReplyMode><CorrelationID/></Msg>
        TSManager    12/03/2015 16:16:42    1920 (0x0780)
    CLibSMSMessageWinHttpTransport::Send: URL: CNBBOSCCM.xyz.COM.BR:80  CCM_POST /ccm_system/request    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    The request has succeeded. 200 OK    TSManager    12/03/2015 16:16:42    1920 (0x0780)
    Executing command line: X:\windows\system32\cmd.exe /k    TSBootShell    12/03/2015 16:18:01    756 (0x02F4)
    The command completed successfully.    TSBootShell    12/03/2015 16:18:01    756 (0x02F4)
    Successfully launched command shell.    TSBootShell    12/03/2015 16:18:01    756 (0x02F4)
    Execution::enExecutionFail != m_eExecutionResult, HRESULT=80004005 (e:\nts_sms_fre\sms\client\tasksequence\tsmanager\tsmanager.cpp,767)    TSManager    12/03/2015 16:24:11    1920 (0x0780)
    Task Sequence Engine failed! Code: enExecutionFail    TSManager    12/03/2015 16:24:11    1920 (0x0780)
    ****************************************************************************    TSManager    12/03/2015 16:24:11    1920 (0x0780)
    Task sequence execution failed with error code 80004005    TSManager    12/03/2015 16:24:11    1920 (0x0780)
    Cleaning Up. Removing Authenticator    TSManager    12/03/2015 16:24:11    1920 (0x0780)
    Clean up boot image stage path D:\_SMSTaskSequence\WinPE    TSManager    12/03/2015 16:24:11    1920 (0x0780)
    Cleaning up task sequence folder    TSManager    12/03/2015 16:24:11    1920 (0x0780)
    DeleteFileW(sVolumeIDFile.c_str()), HRESULT=80070002 (e:\nts_sms_fre\sms\framework\tscore\resolvesource.cpp,508)    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    DeleteFileW(sVolumeIDFile.c_str()), HRESULT=80070002 (e:\nts_sms_fre\sms\framework\tscore\resolvesource.cpp,508)    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    DeleteFileW(sVolumeIDFile.c_str()), HRESULT=80070002 (e:\nts_sms_fre\sms\framework\tscore\resolvesource.cpp,508)    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    Successfully unregistered Task Sequencing Environment COM Interface.    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    Command line for extension .exe is "%1" %*    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    Set command line: "X:\sms\bin\i386\TsProgressUI.exe" /Unregister    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    Executing command line: "X:\sms\bin\i386\TsProgressUI.exe" /Unregister    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    ==========[ TsProgressUI started in process 1000 ]==========    TsProgressUI    12/03/2015 16:24:12    1004 (0x03EC)
    Command line: "X:\sms\bin\i386\TsProgressUI.exe" /Unregister    TsProgressUI    12/03/2015 16:24:12    1004 (0x03EC)
    Unregistering COM classes    TsProgressUI    12/03/2015 16:24:12    1004 (0x03EC)
    Unregistering class objects    TsProgressUI    12/03/2015 16:24:12    1004 (0x03EC)
    Shutdown complete.    TsProgressUI    12/03/2015 16:24:12    1004 (0x03EC)
    Process completed with exit code 0    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    Successfully unregistered TS Progress UI.    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    g_TSManager.Run(), HRESULT=80004005 (e:\nts_sms_fre\sms\client\tasksequence\tsmanager\tsmanager.cpp,657)    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    Error Task Sequence Manager failed to execute task sequence. Code 0x80004005    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    Sending error status message    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    Sending StatusMessage    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    Formatted header:    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    <Msg SchemaVersion="1.1" ReplyCompression="zlib"><ID/><SourceID>FA38A3D4-F715-4F1A-9C06-16B67CB68936</SourceID><SourceHost/><TargetAddress>mp:[http]MP_StatusManager</TargetAddress><ReplyTo>direct:OSD</ReplyTo><Priority>3</Priority><Timeout>3600</Timeout><SentTime>2015-03-12T19:24:12Z</SentTime><Protocol>http</Protocol><Body Type="ByteRange" Offset="0" Length="1164"/><Hooks/><Payload Type="inline"/><TargetHost/><TargetEndpoint>StatusReceiver</TargetEndpoint><ReplyMode>Sync</ReplyMode><CorrelationID/></Msg>
        TSManager    12/03/2015 16:24:12    1920 (0x0780)
    CLibSMSMessageWinHttpTransport::Send: URL: CNBBOSCCM.xyz.COM.BR:80  CCM_POST /ccm_system/request    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    The request has succeeded. 200 OK    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    Finalize logging request ignored from process 1916    TSManager    12/03/2015 16:24:12    1920 (0x0780)
    Process completed with exit code 2147500037    TSMBootstrap    12/03/2015 16:24:12    1872 (0x0750)
    Exiting with return code 0x80004005    TSMBootstrap    12/03/2015 16:24:12    1872 (0x0750)
    Execution complete.    TSBootShell    12/03/2015 16:24:12    764 (0x02FC)
    Finalizing logging from process 752    TSBootShell    12/03/2015 16:24:12    764 (0x02FC)
    Finalizing logs to root of first available drive    TSBootShell    12/03/2015 16:24:12    764 (0x02FC)
    Successfully finalized logs to D:\SMSTSLog    TSBootShell    12/03/2015 16:24:12    764 (0x02FC)
    Cleaning up task sequencing logging configuration.    TSBootShell    12/03/2015 16:24:12    764 (0x02FC)

    O script que altera a letra da unidade 2 do disco, no caso quando se roda o sysprep ele volta para "D:\" e eu preciso colocar "u:\" é o abaixo.

    echo select disk 0 > %temp%\Drive_u.txt
    echo select partition 2 >> %temp%\Drive_u.txt
    echo remove noerr >> %temp%\Drive_u.txt
    echo assign letter=U noerr >> %temp%\Drive_u.txt
    diskpart /s %temp%\Drive_u.txt

    Simplesmente estes caras não executam, alguma sugestão ?

    segunda-feira, 16 de março de 2015 14:26