Automic Workload Automation

  • 1.  Launching the bat file as an administrator

    Posted Mar 16, 2018 06:48 AM
    We are having issue with launching a bat file as an administrator.

    @echo OFF
    cd /
    cd Scripts/app-stop
    echo "Launching the App Stop script now %date%-%time%
    run-app-stop-services.bat
    echo "End time : %date%-%time%

    Can someone explain me the command that I have to use so that the bat file will run as administrator.




  • 2.  Launching the bat file as an administrator

    Posted Mar 16, 2018 06:51 AM
    Yes.

    You right-click the batch file in Windows, click "Properties", and on the "Compatibility" tab, check the box next to "run as Administrator". Your domain policy needs to allow this.

    Alternatively, the command is "runas", you can use the cmd.exe command "runas /USER:administrator" to run things as other users. However, then you usually need to supply a password interactively, which does not combine well with UC4.

    Hth,
    Carsten


  • 3.  Launching the bat file as an administrator
    Best Answer

    Posted Mar 21, 2018 07:14 AM
    I found a solution but I am not sure if it's applicable for everyone or not,
    I've selected the "Login as batch user" option from Windows tab and the job is executing fine.