none
Disable UAC remotely RRS feed

  • Question

  • Hi Team,

    We are automating installation of exe remotely using power shell scripts. The installation of these scripts are blocked due to UAC enabled on Windows 10 by default.

    The automation of copying the power shell and invoking is controlled by python scripts running on ubuntu machine.

    We tried to run command line option to disable UAC, but even that requires cmd to open as Administrator which is blocked by UAC popup.

    Is there a way we can disable the UAC remotely outside windows machine.

    Thanks,

    Anuradha

    Wednesday, November 8, 2017 9:52 AM

All replies

  • Hi Anuadha,

    We have to know that you need the administrative permission to disable the UAC. Since this is a administrative task.

    Please remote login the computer with an account that have the administrative permission, then disable the UAC either via command or GUI.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Thursday, November 9, 2017 7:28 AM
    Moderator
  • Hi Karen,

    We do login to windows machine through automation scripts running outside windows VM using pyvmomi APIs.

    For running command line option to disable UAC, we either need to open powershell or command prompt with Administrator privilege. The execution of below command is prevented by UAC popup-

    WINDOWS_POWERSHELL_COMMAND = "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe"
    WINDOWS_POWERSHELL_POLICY = " set-executionpolicy remotesigned -Force -Scope CurrentUser"
    self.run_command(vm, creds, WINDOWS_POWERSHELL_COMMAND + WINDOWS_POWERSHELL_POLICY)
    PS_SCRIPT =  "/k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f"
    self.run_command(vm, creds, WINDOWS_POWERSHELL_COMMAND + " " + PS_SCRIPT)

    Is there a way we can run above command in normal command prompt without administrator privilege?

    Please assist on how we can handle popup of UAC.

    Thanks,

    Anuradha

    Thursday, November 9, 2017 7:39 AM
  • Hi,

    I am not familiar with pyvmomi APIs, it's recommend you ask in VMware support to see if any solution.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, November 10, 2017 9:49 AM
    Moderator