Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, June 26, 2018 4:57 PM
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.
All replies (21)
Tuesday, June 26, 2018 5:49 PM
Define what step 1 and step 2 are? Are they two separate run command-line tasks?
Start in does not do what you think it does and generally should never be used.
Are you running these before or after the Setup Windows and ConfigMgr task?
Jason | https://home.configmgrftw.com | @jasonsandys
Tuesday, June 26, 2018 5:55 PM
task sequence step 1: Run Command Line
cmd /c md C:\Windows\SoftwareDistribution\somefolder
task sequence step 2: Run Command Line
xcopy ".\somedata" "C:\Windows\SoftwareDistribution\somefolder\ /y
(start in) some package with no program
Tuesday, June 26, 2018 5:59 PM
What about my second question?
Jason | https://home.configmgrftw.com | @jasonsandys
Tuesday, June 26, 2018 6:04 PM
you may need to set it to "continue on error"
Tuesday, June 26, 2018 6:06 PM
Oh, sorry, I thought you were the OP.
Jason | https://home.configmgrftw.com | @jasonsandys
Tuesday, June 26, 2018 6:08 PM
I'll defer to Jason's recommendations.
Tuesday, June 26, 2018 6:17 PM
Yes Jason, Step 1 is a simple call to cmd.exe to create a folder under c:\windows\softwaredistribution using MD command.
Steps 2 is call to xcopy.exe to copy contents of the package to newly created folder. Step 2 has reference to package.
Both steps runs after Setup Windows and ConfigMgr task
Infact there are few pther congifurations and app installation that happens between the Setup Windows and ConfigMgr task and these two steps.
Tuesday, June 26, 2018 6:21 PM
Hey thatnks.. In your suggested step 1 command line; should I check disable 64 bit redirection or not? Also should this step execute in winpe or system should restart in windows OS before this command? An no start in directory i believe?
I am pretty sure i tried it this way to begin with but i will give it another shot.
Tuesday, June 26, 2018 7:42 PM
In step one test, I did not check "Disable 64-bit system redirection" and both steps were tested in the OS, not PE.
The commands completed successfully but I set the options to continue on error.
Again, I would rely on Jason as he is far more experienced in all areas ConfigMgr.
Tuesday, June 26, 2018 7:48 PM
What ConfigMgr version exactly? 2012 SP2? 2012 SP1? Any CUs?
Jason | https://home.configmgrftw.com | @jasonsandys
Tuesday, June 26, 2018 8:34 PM
What ConfigMgr version exactly? 2012 SP2? 2012 SP1? Any CUs?
Jason | https://home.configmgrftw.com | @jasonsandys
Its current branch version 1802
Tuesday, June 26, 2018 8:40 PM
In step one test, I did not check "Disable 64-bit system redirection" and both steps were tested in the OS, not PE.
The commands completed successfully but I set the options to continue on error.
Again, I would rely on Jason as he is far more experienced in all areas ConfigMgr.
ok. I will try by by not checking "Disable 64-bit system redirection". Strangely when i create a separate TS with only these two exact steps and advertise it to run from software center, it seems to work without glitch.
Would you know if there is a command to wait till first time set up completes after the "restart in OS step" for the nest step in TS to execute. I mean I have tried restarting in OS and these steps follow soon after. However since the first time UX is still running, somehow it messes up and throws invalid directory error.
Tuesday, June 26, 2018 8:45 PM
He is using SCCM CB1802 with WinpE from ADK 10 and Windows 7 X64.
Cherif Benammar
Tuesday, June 26, 2018 8:55 PM
you can use the new step to download package to a specific location you specified in advance
Cherif Benammar
Tuesday, June 26, 2018 10:05 PM
Yep, sorry missed that. This is a ConfigMgr 2012 forum though.
The disable 64-bit file direction on the run-command line task is useless in CB though. It runs everything as 64-bit if on a 64-bit OS so that's not the issue here.
It the above log snippet, it says "Working dir 'X:\WINDOWS'"
Are you configuring a Start In path? If so, get rid of it. Can you post screenshots of exactly what you have configured?
Jason | https://home.configmgrftw.com | @jasonsandys
Tuesday, June 26, 2018 11:22 PM
Yep, sorry missed that. This is a ConfigMgr 2012 forum though.
The disable 64-bit file direction on the run-command line task is useless in CB though. It runs everything as 64-bit if on a 64-bit OS so that's not the issue here.
It the above log snippet, it says "Working dir 'X:\WINDOWS'"
Are you configuring a Start In path? If so, get rid of it. Can you post screenshots of exactly what you have configured?
Jason | https://home.configmgrftw.com | @jasonsandys
Tuesday, June 26, 2018 11:24 PM
Yep, sorry missed that. This is a ConfigMgr 2012 forum though.
The disable 64-bit file direction on the run-command line task is useless in CB though. It runs everything as 64-bit if on a 64-bit OS so that's not the issue here.
It the above log snippet, it says "Working dir 'X:\WINDOWS'"
Are you configuring a Start In path? If so, get rid of it. Can you post screenshots of exactly what you have configured?
Jason | https://home.configmgrftw.com | @jasonsandys
This configuration is from an execution which just failed. Offcourse I have masked the real folder name for trademark purposes, however remaining is same.
Tuesday, June 26, 2018 11:25 PM
Hello Everyone.
I seem to have got success after moving these two steps right before Setup Windows and Configuration Manager step. That seem to have worked.
Tuesday, June 26, 2018 11:27 PM
you can use the new step to download package to a specific location you specified in advance
Cherif Benammar
Hey Thanks Cherif. This looks like a great feature. I will try this one.
Friday, July 6, 2018 5:58 PM
Revisiting this thread to share experience.
The create folder command line worked for me when I used it before "setup windows and config manager". I am not sure how that could make a difference but thats how it behaved.
@Cherif\. Once I created the above folder I tried your suggested method to copy contents. I could see that it created additonal folder with package ID. Also this step did not work when I created standalone media for this selected task sequence.
Saturday, July 7, 2018 9:57 AM
Standalone media is supposed to be bundled with all needed packages then the step of downloading a package become void,
Standalone media is for networks with slow connection or even disconnected,
Cherif Benammar