Jump to content


edie209

Copying a file during the task sequence

Recommended Posts

I am trying to copy a file on the initial install to C:\Program Files I have followed this guide http://blog.configmgrftw.com/?p=332 but it creates a folder C:/Program doesn't copy the file and the task sequence fails. BTW I placed it at the end of my task sequence.

 

Is this the best way to achieve this? of is there a better way? I don't want the file in my image as it serves for two different sections of my clients.

Share this post


Link to post
Share on other sites

Just create a package with the file in it and a batch file also.

 

The batch file will look like this

 

copy %~dp0myfile.file "C:\Program Files" /y

 

The run command line for the package program would be the name of the batch file.

 

OR

 

Create a package out of the file, distribute to DP and in your task sequence add a run commandline task that references your package and the command line would be:

xcopy ".\*.*" "C:\Program Files" /D /E /C /I /Q /H /R /Y /S

  • Like 1

Share this post


Link to post
Share on other sites

 

The run command line for the package program would be the name of the batch file.

 

 

Could you please elaborate some more on this as my task sequence fails on the copy

tasksequence.jpg

 

and this is my .bat file

if not exist "%1" md "%1"

copy %~dp0Fireworks8P.exe "C:\Program Files" /y

Share this post


Link to post
Share on other sites

Hi

 

Crossed wires here. If you are just using package with batch file then the name of the program commandline (my mistake ) would be the name of the batch file but you must make sure that the batch file is present in the package also with your file.

 

The above screen shot is good only if you add

xcopy ".\*.*" "C:\Program Files" /D /E /C /I /Q /H /R /Y /S

 

as the command and not filecopy.bat

Share this post


Link to post
Share on other sites

You can be assured that it will work! ;)

The task sequence method that you have posted above would be the way to go, as stated just change the copyfile.bat portion to:

xcopy ".\*.*" "C:\Program Files" /D /E /C /I /Q /H /R /Y /S

 

p.s send some sun this way!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.