Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

PENDING Task sequence sccm problem

  • Thread starter Thread starter moulouy
  • Start date Start date
  • Replies Replies 1
  • Views Views 2K

moulouy

Member
Messages
12
Reaction score
0
Points
1
Hello,
in my task sequence i have added an Run Command line
the command is "copy_files.cmd"
IF NOT EXIST "%~dp0Logs" MKDIR "%~dp0Logs"
call :sub>c:\programdata\test\logs\copy_files.log 2>&1 (
goto end
:sub
if not exist C:\ProgramData\test md C:\ProgramData\test
start "" /wait xcopy /Y /E "%~dp0\." "C:\ProgramData\test\."
timeout 30
reg add HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce /v "RunOnceAdmin" /t REG_SZ /d "C:\ProgramData\test\RunOnce.cmd" /f
):end

the copy_files.cmd never copy, and of course the reg key never executed, it did it before but i don't know why in one time it stop to copy.
i added a Pause after a command in my TS, and found that the "%~dp0" is "c:\windows\ccm"
but the package is in "c:\_SMSTaskSequence\Packages\XXXXXX\."
Any idea please?
 
Back
Top