BatchPatch Forums Home › Forums › BatchPatch Support Forum › Temp folder
- This topic has 6 replies, 3 voices, and was last updated 8 years, 10 months ago by doug.
-
AuthorPosts
-
May 7, 2015 at 12:20 pm #9045MbrodinParticipant
Hi
Is there a way to NOT use a temp folder in BP?
even if I configure my deployment / and tools – setting, when I deploy it uses a temp folder which makes McAfee upset, cause of the name “temp”
regards
Mats
May 7, 2015 at 2:09 pm #10730dougModeratorMats – The current behavior during a deployment depends on whether or not the “Leave entire directory contents” is checked.
If “Leave entire directory is checked” BatchPatch does *not* create a sub temp folder under the target working directory. BatchPatch will place files into the directory that you specify as the target working directory, and then BatchPatch will leave them there when the deployment is complete.
If “Leave entire directory is unchecked” BatchPatch *does* create a sub temp folder under the target working directory. This is because the folder used is, in fact, temporary. BatchPatch then deletes the entire temp folder after the deployment is complete.
I’m a bit confused as to why McAfee would have a problem with a folder simply because it has the name “temp” even if it appears in a program files directory such as C:Program FilesBatchPatchtemp. This seems very odd to me. Can you tell me what happens? How does McAfee respond to this? Is there not a way to simply whitelist C:Program FilesBatchPatch (or whatever directory you’ve set as your target working directory)? Do you know of anywhere that McAfee might have the behavior documented so that I can take a look at what they say they are doing and/or why?
Thanks,
Doug
February 20, 2016 at 6:03 am #11137jsira7ParticipantI plan on trying to deploy a .bat file to a specific directory and I would like it to run once executed. That being said, if I select “Leave entire directory contents” it will copy this .bat to the specific directory that I choose without including a temp subfolder. This is good. My question is that I will be running this .bat every so often, so when I create a deployment job for a second time will it overwrite the contents (since the name of the .bat file will be the same) or will it just rerun the original .bat file? I then plan on creating a schedule for this to happen every other day or so. My main goal is to run this .bat file every other day. Would this accomplish it?
February 20, 2016 at 5:24 pm #11138dougModeratorIf your goal is to run a .bat file on target computers every couple of days, on-demand, then you have a couple of options. You could simply create a deployment (no need to “leave entire directory contents” if we’re just talking about a single .bat file) and run that deployment every couple of days. BatchPatch will copy the .bat file to the target system, execute it, and then delete it (or it will leave it if you choose to leave it). If you leave it but then re-run the deployment a day later, the deployment will still copy the .bat each time because a deployment in BP is a copy plus execute job. Alternatively you don’t have to use a deployment and could instead just copy the .bat file to the target machines using the “copy file/folder” action. Once on the remote machines you could use a “Remote command” in BP to execute the .bat file every other day. I’d suggest you just work with a test computer and fiddle with the different options so that you can see how they behave and decide what you want or prefer. It should be pretty straightforward.
-Doug
February 22, 2016 at 4:16 pm #11140jsira7ParticipantGreat! Thanks for the quick reply. The reason I was checking “Leave entire directory contents” was because I didn’t want it to create a “Temp” subfolder. I will tinker around to see what option works best… Much appreciated!
February 22, 2016 at 4:42 pm #11141jsira7ParticipantQuick question Doug… I’m sure by looking at this you can figure out my error. I’m trying the Remote Command feature by executing the .bat file since it’s already in the directory I need it to be. However, I get an error code 1 when trying to execute it. From the blog error code 1 states invalid syntax. I’m sure I’m the knuckle head here 🙂 So here’s what I’m trying to do… I run Malwarebytes on several systems. Since they don’t have an option to remove quarantined items from their management server, I needed to write a .bat to do this for me. I’m fairly new to writing .bat files so the error is for sure me. Since the .bat (named MB_Quarantine_Remove.bat) is already in the following directory I’d like to just execute it there:
C:Program FilesMalwarebytes’ Anti-Malware
Here’s what I inputted in the Remote execute command that generated the exit code 1:
cmd.exe /c “cd C:Program FilesMalwarebytes’ Anti-MalwareMB_Quarantine_Remove.bat”
Do you see what I did to generate the error?
February 22, 2016 at 7:21 pm #11143dougModeratorIn Remote Command 1/2 (not 3/4) use the following syntax:
cmd.exe /c “C:PathToYourFile.bat”
-Doug
-
AuthorPosts
- You must be logged in to reply to this topic.