Running a batch file in App-V 5.1 RRS feed

  • Question

  • Over the last couple of days I have been trying to get a simple batch file to run in App-V 5.1. All I want the file to do is run gpupdate.exe to refresh group policy after the app finishes loading. I set it up in the delpoymentconfig.xml:

    - <MachineScripts>
    - <PublishPackage>
      <Arguments>/C [{AppVPackageRoot}]\..\Scripts\gpupdate.bat</Arguments>


    The script is embedded in the virtual app. So far, it doesn't seem to run.

    Still new to scripting and would like to use scripting more in my app-v packages. 

    Louis Paxton

    Tuesday, August 2, 2016 9:45 PM

All replies

  • This script runs only on publishing time if the package is deployed globally.
    You say you want to run it before the app starts? Use a startVE script.

    Also, if you still want to run it on publishing time, and you publish to users, you need to modify the userconfig instead. One last thing, you cant call gpupdate.exe directly, no need for a batchfile. Also the workingdir for scripts is the scriptfolder, no need to put in the path "[{AppVPackageRoot}]\..\Scripts"

    Roy Essers

    • Edited by Roy Essers Tuesday, August 2, 2016 10:51 PM
    Tuesday, August 2, 2016 10:51 PM
  • Also make sure if you are using userconfig file, test it in a domain account. It wont run in local account.

    (Please click on Vote as Helpful and/or Mark as Answer, if it has helped you.)

    MVP - Windows and Devices for IT

    app2pack.blogspot.com: app2pack.blogspot.com

    Wednesday, August 3, 2016 12:50 PM