![]() Then it works but only to the C:UsersPublicSecureAssess part, missing out the rest of the path I assume because of the space. If I run it manually in the following way: filecopy.bat C:UsersPublicSecureAssess Central – SecureClient CANDGconfigfiles In SCCM log files it just tells me it is timing out. So, I’ve followed the above, but because I need to copy my file to a specific folder that already exists on the system with spaces included the code seems to be falling over. I’m using this code to update some software where I need to replace one file after install to automatically fill out our proxy details. Create a sub-folder in the folder just created called Files2Copy and place the files you are going to copy in this folder. Create a parent folder in your source file repository.Ģ. The very simple solution presented here can of course be expanded upon and customized but is flexible enough to be just dropped in without any real customization.ġ. Using a batch file though, you can use the %~dp0 batch file parameter within the batch file itself to refer to the directory the batch file is run from. You should never count on it being in one place and thus you should never hard-code a path in. I discussed this previously ( Current Directory in ConfigMgr Programs) but in summary and in general, the current working directory of a program in ConfigMgr is the folder containing the package files whether that be cached locally or on the DP based on where the program is run from. ![]() ![]() ![]() The main bad assumption has to do with the current working directory. It’s not that it’s a difficult task per se, it’s that people go into it with bad assumptions. ![]() This seemingly simple task stumps and trips up a lot of people in both ConfigMgr 2007 and ConfigMgr 2012. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |