Temp folder

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #9045
    Mbrodin
    Participant

    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

    #10730
    doug
    Moderator

    Mats – 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

    #11137
    jsira7
    Participant

    I 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?

    #11138
    doug
    Moderator

    If 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

    #11140
    jsira7
    Participant

    Great! 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!

    #11141
    jsira7
    Participant

    Quick 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?

    #11143
    doug
    Moderator

    In Remote Command 1/2 (not 3/4) use the following syntax:

    cmd.exe /c “C:PathToYourFile.bat”

    -Doug

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.