Skip to main content
Question

Application: Open program/file, how to 'run as administrator' ?

  • August 29, 2022
  • 3 replies
  • 1370 views

Forum|alt.badge.img+7

exampleHello, I have a .bat file that I need the bot to run but as administrator, as opposed to just straight opening the file (screen shot included of what I need). Is there a parameter I can use in the application: open program/file command that will do this?

 

3 replies

Forum|alt.badge.img+5
  • Navigator | Tier 3
  • August 30, 2022

I think with AA command it will not possible, instead edit this bat script to always open as admin, follow this article:

 

https://stackoverflow.com/questions/6811372/how-to-code-a-bat-file-to-always-run-as-admin-mode/p>

 

Cheers,

Ikshit Dhawan


Forum|alt.badge.img+5
  • Navigator | Tier 3
  • August 30, 2022

You may also try the option below when running the bot:

 

image


Forum|alt.badge.img+7
  • Author
  • Navigator | Tier 3
  • August 30, 2022

Hi! Thank you for your response! I had actually found that same post yesterday afternoon! This response worked for me:

imageI put my shortcut on the Desktop, and then when I am telling AA to open it, reference the shortcut location like this:

image 

For your second suggestion, the bot always runs as admin in my case but when opening a bat file you have 2 options: 'Open' and 'Run as administrator'. Even as an admin if I simply 'Open', I still get an 'access denied' error on some of the actions.