Link to home
Start Free TrialLog in
Avatar of WNottsC
WNottsCFlag for Afghanistan

asked on

Copying files and running batch files with sccm

I would like to copy some files to a C:\temp folder on the local machine as part of the OS deployment but also be available as a stand alone package deployment.  I have seen lots of examples but I am still a little confussed as to how to do this.  I would also like to do the same with a batch file but one thing at a time.
ASKER CERTIFIED SOLUTION
Avatar of merowinger
merowinger
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of techjunkyjosh
techjunkyjosh

I use the following batch file to copy an exe to the system32 folder on every pc on my domain.

@echo off
xcopy /y %~dp0program.exe %systemroot%

Replace program.exe with the file you want to copy over. you can also modify the target by changing %systemroot% to the folder you desire. Then on the SMS server create a folder and put the files you want to deploy along with the batch file all in the same folder. Then have an sms program run the batch file. The batch file will look in the same folder for the files to copy over. If you have multiple files you can repeat the command in the batch file.
@echo off
xcopy /y %~dp0program.exe %systemroot%

Open in new window

Any update?