2 Replies Latest reply on Jan 5, 2012 4:46 PM by historicalshavlikemployee

    custom patch using bat file

    Master
      I want to create a custom patch file which is a BAT.  i.e.  mypatch.bat .  Creating the patch works.  scanning for the patch works.  But when I attempt to deploy the patch the bat file in the c:windowspropatchesinstall file runs.  It then executes the  mypatch.bat file but after it runs, the rest of the bat file in the c:windowspropatchesinstall never runs.  Is there a way to return control back the the calling bat file that shavlik creates to deploy the patch?
        • 1. Re: custom patch using bat file
          Master
          I have figured out what the issue is, though I don't know of a solution without a change in the VMware vCenter software.  When a patch is deployed, the patches are copied to "c:windowspropatchespatches" and the deployment scripts are copied to "c:windowspropatchesinstall".  In the install folder is the .bat file which manages installation of the patch along with sending status updates back to the console.  When the the patch is a ".bat" file, the deployement batch file does not use the "Call" command. So it passes control to the patch ".bat" file, it executes, then control is never passed back to the deployment ".bat" file.  The VMware vCenter software would need to recognized that the patch is a ".bat" file and add a "call" command in from of the line that executes the patch ".bat" file.  I don't know of any other way for control to pass back to the calling ".bat" file.
          • 2. Re: custom patch using bat file
            Master

            You are correct in stating that the batch file will never return control to the originating batch file without the use of the 'call' parameter. Unfortunately, our custom patches do not provide a method of inserting this parameter. I would certainly urge you to submit a feature request for this functionality as follows:

            https://www.accompa.com/featureidea.html?fname=shavlik


            You can, however, push a batch file which can subsequently be executed using the 'call' command via a custom action (configured via the 'custom action' tab within deployment templates), although this does not have all of the same functionality as a custom patch. For more specific details, please see the 'Custom Actions' topic within our administration guide (also available via the 'Help>Index' menu).

            We also have an on-demand training video available regarding this topic (the video is located within the Shavlik NetChk Protect 7.5 section, but still follows a very similar architecture in later versions). Our on-deman training videos are available as follows:

            http://www.shavlik.com/training-on-demand.aspx