Millsy79 Posted March 15, 2016 Posted March 15, 2016 Hi I'm trying to use SCCM to run a .bat file that will copy an .exe file from the sccm server to the classroom PC's. using robocopy \\severname\folder c:\ doesn't work as apparently SCCM doesn't see UNC paths. So I have tried robocopy %~dp0 c:\ but this isn't working either. what's the best way for me to copy this file to the PC's? Thanks
sparkeh Posted March 15, 2016 Posted March 15, 2016 Can you use Group Policy Preferences to copy the file? 1
Blue_Cookeh Posted March 15, 2016 Posted March 15, 2016 (edited) Create a Package in SCCM (not Application) that includes your bat file and the file you're trying to copy. In the bat file I use this: xcopy.exe "%~dp0Kar2ouche.lnk" "c:\Users\Public\Desktop" exit /b 0 You then create a Program inside the Package in SCCM and give it the full bat name (in my case SCCM_Install.bat) in the "Command line" box. I use this method to run a bat that unzips our Kar2ouche files to the local device over the network and then copy the shortcut to the desktop. Edited March 15, 2016 by Blue_Cookeh 1
Fazza Posted March 16, 2016 Posted March 16, 2016 I created a self-extracting ZIP file when I had to do something similar and then deployed that via SCCM which did the trick for me.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now