PolicyPak Least Privilege Manager: How do I elevate .BAT files?

To elevate .BAT files, you need to use a Combo rule. With Path and Command-line conditions.
The Path condition should be:

%SYSTEMROOT%\system32\CMD.exe

policypak-least-privilege-manager-how-do-i-elevate-bat-files-0

Then the Command-line Argument needs to specify the “Strict equality” mode. Then the actual command needs a /c for running, then also add exactly where the BAT is located, and its name. Note that the syntax requires TWO double-quotes, then the path, a double-quote to close the path, then a space then a final ending double-quote.
For instance, in bellow image, you can see the following string for command line argument (which must be in “Strict” mode) (and all in quotes):

/c ""c:\temp\folder\bat1.bat" "

policypak-least-privilege-manager-how-do-i-elevate-bat-files-1

WARNING: Again note that the BAT command-line must be in a special format which includes /c then two double-quotes to start, the path and .bat file, a closing quote, then a space (very important), and a final closing quote.

Back