criteo/vagrant-winrm

Run command with Administrator rights

Closed this issue · 1 comments

I need to run the command in my batch script with administrator rights, what is the recommended way?

At the moment I receive following error:

The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

Additional: And why when I execute the program it is not seenable on the display? Is there a way?

for example:

vagrant winrm -c "C:/Windows/System32/notepad.exe"

Thanks a lot.

Annih commented

Hello @tommyziegler

Sorry for the delay!
Interactive commands are not supported (like #9)
But if you want to run your command with Elevated privilege just pass the -e option

vagrant winrm -e -c "echo elavated echo are useless"

Regards