AutoSys Workload Automation

  • 1.  How to run a script in "Run as Administrator" in Windows 2012 R2?

    Posted Sep 26, 2016 07:50 PM

    Any ideas if this is possible in CAWA DE R11.3?

     

    The server which we are trying to run the script, recently got an upgrade, and the script now needs to be run in "Run as Administrator" mode (Requiring a response from Windows UAC).  We are already running the script as a user in the Administrator user group, but the job still fails "must be superuser to execute".



  • 2.  Re: How to run a script in "Run as Administrator" in Windows 2012 R2?

    Posted Sep 26, 2016 11:45 PM

    using a user in the local Administrator group should not trigger a message like this.

     

    "must be superuser to execute" doesn't seem like a Windows error message. I would expect Windows to use "Administrator" instead of "superuser" or something like "requires elevated privileges".

    Perhaps this is an application or script error message? If so, can you provide more details?



  • 3.  Re: How to run a script in "Run as Administrator" in Windows 2012 R2?

    Posted Sep 27, 2016 04:56 PM

    Thanks for your help.  JeanPaulLucas led us to the agentparm component (oscomponent.logon.elevated=true) that gave us what we needed.  You were correct to assume the message was coming from the application, but it still needed to be run as an eleveted logon.  I appreciate your response!



  • 4.  Re: How to run a script in "Run as Administrator" in Windows 2012 R2?

    Posted Sep 27, 2016 02:14 AM

    On win2012r2 you might test to set "run all administrators in admin approval mode" to disabled in local policies (security options). Good luck!



  • 5.  Re: How to run a script in "Run as Administrator" in Windows 2012 R2?

    Posted Sep 27, 2016 02:58 AM

    Hi

    If you get a message like: "The requested operation requires elevation" you can dd this parameter into the agent's agentparm.txt file and recycle the agent:

    oscomponent.logon.elevated=true

     

    Now if you prefer to set this option at Job Level in Autosys, you ca use the elevated attribute in your job definition

    This is described in the Reference guide


    If you specify to use elevated mode in a Command job definition, the agent runs the job in elevated mode on Windows. You do not need to respond to the UAC prompt.

    Supported Job Type
    This attribute is optional for the Command (CMD) job type (see page 290) on Windows. This attribute is ignored for Command jobs that run on UNIX.
    Syntax
    This attribute has the following format:
    elevated: y | n
    y
    Runs the Command job in elevated mode on Windows.
    n
    Does not run the Command job in elevated mode on Windows. This is the default.

     

    Regards

    Jean Paul



  • 6.  Re: How to run a script in "Run as Administrator" in Windows 2012 R2?

    Posted Sep 27, 2016 04:55 PM

    This is exactly what we needed.  Although the error was coming from the application level, the application needed a script run from this elevated level in order to run successfully.  Thanks for the help. JeanPaulLucas