10

Until now I used shortcut with "runas/user:ComputerName\Administrator /savecred "C:\Program Files (x86)\example.exe"

when I type a command in the cmd error 740 occurs:

C:\>"C:\Users\user\Favorites\Linki\runas.exe.lnk"
Attempting to start C:\Program Files (x86)\example.exe as user "ComputerName\Administrator" ...
RUNAS ERROR: Unable to run - C:\Program Files (x86)\example.exe
740: The requested operation requires elevation.

Does anyone know if this is an error or a deliberate action, and how I can achieve this functionality now?

Regards

Cas
  • 2,014
dudinr1
  • 111

5 Answers5

5

I somehow managed to solve the issue by first running the command prompt as administrator using

runas /profile /savecred /user:administrator "cmd.exe" 

put another batch file in \windows\system32 folder to run the exe. and just type the name of that batch file.

Cas
  • 2,014
Robinson
  • 51
  • 1
5

This is what worked for me

start cmd first then use it to start your other app

runas /profile /user:ExlordPC\Exlord /savecred "cmd.exe /k C:\Users\Exlord\AppData\Local\NextVPN\NextVPN.exe"

Exlord
  • 273
3

I just got bitten by this on a machine, now running Windows 10 version 1803 (as installed on 2018-06-18).

The solution (combined with the other answers here) for me was discovery (and reversion) of a change to my local PC's GPO.

  • In the GPO snapin for mmc.exe
  • Navigating to: Local Computer Policy / Computer Configuration / Windows Settings / Security Settings / Local Policies / Security Options
  • There's a setting called
    "User Account Control: Admin Approval Mode for the Built-in Administrator account"

Reverting that to what it calls the "Default" mode of disabled resolved the issue.

Possibly using an administrator account other than the built-in default might have worked too (untested).

wally
  • 179
2
runas /savecred /user:YourDomain\YourUser "cmd /c start /b mmc dsa.msc"
JW0914
  • 9,096
Gaston
  • 143
  • 4
-1

I found a solution create a batch file and put the following command in that runas /profile /savecred /user:administrator "cmd.exe /C

eg. runas /profile /savecred /user:administrator "cmd.exe /C D:\190914\SmartDB\smartdb.exe"

Save the batch file and run it.