I’ve tried a couple different methods of copying some files from the Provisioning Package to the system drive. In the batch files attempts, it did create the log file as expected, meaning I know it has access to the %SystemDrive%. What am I doing wrong? Or is there some other way to copy files?
Methods I tried:
-
PrimaryContext command
CommandFile: c:deploymentfilestest.bat CommandLine: cmd /c test.bat
-
DeviceContext command
CommandFile: c:deploymentfilestest.bat CommandLine: cmd /c test.bat
test.bat
@echo off set LOGFILE=%SystemDrive%logsprovisiontest.log mkdir c:logs >NUL 2>&1 copy test.txt %SystemDrive% >NUL 2>&1 echo Copy result: %ERRORLEVEL% >> %LOGFILE%
-
PrimaryContext command
CommandFile: c:deploymentfilestest.txt CommandLine: copy test.txt %SystemDrive%