Task Sequence Run Command Line Error: Working dir 'not set'
In my task sequence I have setup a few tasks to Run a Command Line for simple tasks -- copying a file from a network share to the %windir%, and running a local EXE on the machine.

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.
October 15th, 2008 9:08pm

Hello,

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
Free Windows Admin Tool Kit Click here and download it now
October 16th, 2008 1:35am

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

October 16th, 2008 6:46am

Gosh!

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
Free Windows Admin Tool Kit Click here and download it now
October 16th, 2008 7:30am

Thank you both for the prompt reply.

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.
October 16th, 2008 4:00pm

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'.


Free Windows Admin Tool Kit Click here and download it now
April 30th, 2011 8:11am

I had similar issue followed your step it worked.

Thanks

November 6th, 2012 11:40am

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.

Free Windows Admin Tool Kit Click here and download it now
August 8th, 2014 12:47pm

I have the same problem.

Someone has found a solution?

March 17th, 2015 4:15am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics