Automic Workload Automation

 View Only
  • 1.  How to run elevated commands without disabling UAC

    Posted May 10, 2016 07:11 PM

    Some jobs that run (eg)Powershell as administrator requires a  UAC prompt.
    If disabling UAC or mimic disabling UAC on host ( set "User Account Control: Run all administrators in Admin Approval Mode" to "Disabled") is not an option on your company, then you can try some options below. 

    Option A: Use the -Verb parameter of the Start-Process powershell command to run the process as admin
    Link: http://ss64.com/ps/syntax-elevate.html
     
    Option B: Add the executable to the Task Scheduler
    Link: http://lifehacker.com/how-to-eliminate-uac-prompts-for-specific-applications-493128966 

     
    Example for Powershell 1.0 
    1) In Task Scheduler, right-click "Task Scheduler Library" and select "New Folder" Name it whatever you would like.

    2) Select the new folder and click "Create Task" (not "Create Basic Task")

    3) Name the task something descriptive. Enable "Run with highest privileges," and select your OS under "Configure for."

    4) Under the Actions tab, select "Start a program" in the Action dropdown if it isn't already. Click Browse and find your app's .exe file (usually 4) under Program Files on your C: drive).

    5) (Laptops) Under Conditions tab, deselect "Start the task only if the computer is on AC power."

    6) On your desktop, right click and select New > Shortcut.

    7) Paste 'C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe  /RUN /TN "Name of folder\Name of task" into the text box.




  • 2.  How to run elevated commands without disabling UAC

    Posted Oct 09, 2016 04:00 PM

    If disabling UAC or mimic disabling UAC on host ( set "User Account Control: Run all administrators in Admin Approval Mode" to "Disabled") is not an option...

    If it is an option and you want to know how to get to the "User Account Control: Run all administrators in Admin Approval Mode" setting, here is how to get to it:
    1. Type "gpedit.msc" in the Windows Start menu search box.
    2. This will open up the Local Group Policy Editor.
    3. Go to Computer Configuration
    4. Windows Settings
    5. Security Settings
    6. Local Security Options > User Account Control: Run all administrators in Admin Approval Mode 
    7. Change it to 'Disable'.