Elevate a batch file

Sometimes the functions in a batch file, like registering a .dll or adding a registry change, require you to have elevated rights. This document shows you how to elevate a batch file to run with administrative rights.

  1. Import this XML file. The file extension does not matter for the import. The SMP simply looks at the contents of the file to see if it is valid XML. The default find file window does have a .xml filter on it, so that would need to be changed to all files.
  2. Change the name in the test.bat filter to whatever the batch file name is and save the filter.



  3. Then set the Applies to section of the "Batch File Elevate Process Rights" policy to the correct machines and enable the policy and save.
  4. Then to make the test go more quickly, click Update in the SMP agent setting UI and the policy will become active within generally a few seconds on the test machine.
  5. Then run the batch file from the command line, a shortcut (link), double clicking, or selecting the batch file and hitting Enter.
  6. The Message action should show and the batch file should execute with Administrative privileges.