Some of my "Run a Command Line" look like this;
cmd /s copy "\\server\share$\file.txt" C:\Windows\
Another one;
cmd /s "C:\Program Files\Company\app.exe" /commandlineswitch
The errors I am seeing in the ConfigMgr Console are;
The task sequence execution engine failed executing the action (Command Line Test) in the group (Group) with the error code 1460
Action output: =======================[ smsswd.exe ] =======================
PackageID = ''
BaseVar = '', ContinueOnError=''
SwdAction = '0001'
Set command line: Run command line
Working dir 'not set'
Executing command line: Run command line
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.. The operating system reported error 1460: This operation returned because the timeout period expired.
I have the command line set to expire in 10 minutes or else it would hang forever.
Is anyone else seeing any issues with running a command line within a task sequence?
Thanks.
Working dir 'not set' seems to be the key to this issue.
You need to set the folder for "Start in", especially in the case of the app.exe it should be C:\Program Files\Company and the Windows directory for the primarily cmd copy command.
Regards,
Akin
That "Working dir 'not set'" is just a warning.
The problem here is that cmd.exe does not exit, and so the step timed out.
You should specify the "/c" to cmd.
Here is an example:
cmd.exe /c time /t >>C:\TimeFile.txt
I was blind-sided on that one - I thought I was seeing /c, which is why I moved on to other possible causes - shows one should not be doing techie stuff at 2:30AM, what you see might not be what it seems.
Thanks.
Akin
I have adjusted the cmd switch to "/c" and it seems to be working properly now.
Another question relating to this - Can the "Start In" location contain variables, such as "%programfiles%" ?
Thanks again.
I also had this problem but found another solution..
When adding custom command line steps to a task sequence that modify system file structure, it's a good idea to do one of two things..
1. include force/overwrite switches to your command
2. tick the 'Continue on error' checkbox
I found that without doing either of these, my task sequence was failing when I tried to create a folder on the system drive as it already existed. When I looked through the logs the only indication was that Working dir was 'not set'. Would have made a lot more sense if it had of logged an error along the lines of 'Directory already exists'.
I had similar issue followed your step it worked.
Thanks
Hello, i have a another example
Comand Line:
WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule {00000000-0000-0000-0000-000000000113} /NOINTERACTIVE
Error:
The task sequence execution engine failed executing the action (Scan for Updates II) in the group (Install Updates II) with the error code 44506
Action output: [ smsswd.exe ]
PackageID = ''
BaseVar = '', ContinueOnError=''
ProgramName = 'WMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule {00000000-0000-0000-0000-000000000113} /NOINTERACTIVE'
SwdAction = '0001'
Set command line: Run command line
Working dir 'not set'
Executing command line: Run command line
Process completed with exit code 44506
Command line returned 44506.
I have the same problem.
Someone has found a solution?