Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I run a batch script as administrator from Bamboo?

There is an option to configure a script to run as part of a plan for Bamboo. However, when I try to run a particular batch script, it fails. When I run it as the Administrator user from the remote desktop instance, it does not fail. I am assuming that the issue is that the script is not being run as an administrator, but as the Bamboo user. Is there a way to run a particular batch script as an administrator? I am using an elastic EC2 instance from AWS with Windows Server 2008 R2.

Here is my current setup:

enter image description here

By the way, this is part of an alternative attempt at this question: Boot EBS volume from Bamboo instance

like image 704
Jake Avatar asked Oct 20 '22 01:10

Jake


1 Answers

I have not used bamboo, but to allow a Windows service to run commands as an administrator, first the service itself must have administrator privileges. Otherwise, it will be denied. Change the service user in the Windows services control panel. These are the generic instructions on how to change the service user:

  1. Run services.msc
  2. Find the target service
  3. Open the properties for the service
  4. Select the Log On tab
  5. Select Use this account and enter an account on the server that has administrator privileges
  6. Restart the service
like image 190
David Ruhmann Avatar answered Oct 23 '22 00:10

David Ruhmann