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?
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?