I have a batch file with some Logman commands for creating and turning on PerfMon Data counters. To run this batch file it has to be ran in a Elevated command prompt. I cannot figure out how to push these batch files in an elevated command prompt. Any ideas? I tried bundling the batch file into an .exe using iexpress and that didn't work.

Appreciate any feedback or assistance

Answer Summary:
0 Comments   [ - ] Hide Comments


Please log in to comment

Answer Chosen by the Author


You can run it as the system user to avoid having to deal with UAC.
Answered 08/18/2016 by: nheyne
Red Belt

  • That is how I run all of our scripts are with local system. Let me test it again just to make sure, because it still didn't work but let me confirm and reply. Thank you for your comments
  • That was it you got it. So originally I was using a template xml file that was on a network resource not open to "Everyone". I moved it but never tried the original batch file script again. Just ran into issues running the batch file from the server itself. Thank you so much for your help everything is working now.
Please log in to comment
Answer this question or Comment on this question for clarity


There is a really neat tool out there, just an executable that you can pair with your batch file to run them under elevated privileges.  I believe this is the link:  http://www.winability.com/elevate/

So the process in KACE would be something like:
  • Add the Elevate executable and the batch file as a dependency in the script
  • In the tasks use "Launch a program..."
  • Directory:  $(KACE_DEPENDENCY_DIR)
  • File:  Elevate_x64.exe
  • Parameters:  sample.bat

Great way to get around UAC.

Answered 08/22/2016 by: looshus
Senior Yellow Belt

Please log in to comment
I believe I have done this before then zipped the files up and called the shortcut. I can';t find an example on my K1000 box but it seems like I did it.


Make a batch file in an editor and nameit.bat then create a shortcut to it. Nameit.bat - shortcut. then right click on Nameit.bat - shortcut ->Properties->Shortcut tab -> Advanced and click Run as administrator. Execute it from the shortcut.

Borrowed from
Answered 08/18/2016 by: rockhead44
Red Belt

  • So, is there any way to force it to hit yes to a UAC prompt once ran? Most of our servers still have UAC enabled and disabling it on all of them will be a whole other issue for us.
Please log in to comment