HI. I have what it looked like a fairly simple requirement.
1> Create a folder during OSD TS execution
2> Copy some contents to that folder
For this purpose I have created a standard package without any programs.
For Step 1> I have tried following combination
%windir%\system32\cmd.exe /c md C:\Windows\SoftwareDistribution\SomeFolder <> Tried with quotes, with only cmd.exe /c etc
Start In - C:\windows\system32 <> tried keeping this field blank
For Step 2> %windir%\system32xcopy.exe ".\*.*" "C:\Windows\SoftwareDistribution\SomeFolder" /D /E /C /I /Q /H /R /Y /S
this has the folder selected that has contents.
Below is the error reported:
The task sequence execution engine failed executing the action (Create SomeFolder Folder) in the group (SomeFolder Installation) with the error code 2147942667
Action output: ... ackageID = ''
BaseVar = '', ContinueOnError=''
ProgramName = 'C:\WINDOWS\system32\cmd.exe /c md C:\Windows\SoftwareDistribution\SomeFolder'
SwdAction = '0001'
Command line for extension .exe is "%1" %*
Set command line: Run command line
Working dir 'X:\WINDOWS'
Executing command line: Run command line
CreateProcess( NULL, (LPWSTR)m_sCommandLine.c_str(), NULL, NULL, TRUE, bNT ? CREATE_UNICODE_ENVIRONMENT : 0, m_pEnvironmentBlock, pszWorkingDir, &si, &pi ), HRESULT=8007010b (..\CommandLine.cpp,1010)clCommandLine.Execute( uOptions, pszWorkingDir, lpDesktop
), HRESULT=8007010b (runcommandline.cpp,565)
cmd.Execute(pszPkgID, sProgramName, dwCmdLineExitCode), HRESULT=8007010b (main.cpp,378)
CreateProcess failed. Code(0x8007010B)
Command line executionfailed (8007010B)
Failed to execute command line 'C:\WINDOWS\system32\cmd.exe /c md C:\Windows\SoftwareDistribution\SomeFolder' .
The directory name is invalid. (Error: 8007010B; Source: Windows)
Install Software failed to run command line, hr=0x8007010b. The operating system reported error 2147942667: The directory name is invalid.
I thought it is trying to execute in X:\windows there fore changed to environment variable %windir% to launch cmd.exe. Also I tried to restart the machine is Windows OS before these two steps. Also the Disable 64 bit redirection is checked.
I am running SCCM CB1802 with WinpE from ADK 10 and Windows 7 X64.
Please let me know what could be causing this seemingly simple step to fail.