calling a exe file from Powershell RRS feed

  • Question

  • HI ,

    I am trying to call a exe file using Start-process. When I use credential parameter, I can't use verb parameter and vice-versa.

    $path = "H:\soft_web\software\notepad++"
    $username = "MUMBAI\asharma"
    $password = get-content "H:\soft_web\securestring.txt" | ConvertTo-SecureString
    $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username, $password
    start-process $path\npp.7.5.8.Installer.x64.exe  -Credential $cred -Wait 
    it giving me error the elevated rights are require to run exe file.
    • Moved by Bill_Stewart Monday, December 17, 2018 6:44 PM No; you cannot bypass the UAC prompt
    Friday, October 5, 2018 2:37 PM

All replies

  • You cannot elevate using credentials.  You can only elevate the current admin account. 


    Friday, October 5, 2018 3:20 PM