profesorfalken / jPowerShell

Simple Java API to interact with PowerShell console
Apache License 2.0
218 stars 84 forks source link

Launch as Administrator #15

Open seahckr opened 7 years ago

seahckr commented 7 years ago

I want my commands to execute as a Administrator - what's the best way to achieve this?

profesorfalken commented 7 years ago

Hello,

You should launch your java application as an administrator in order to archieve this.

Regards

NexRX commented 3 years ago

I noticed this was still open despite being an old issue, but for anyone else searching like I was.

Running your applications executable as admin will indeed work. But if your using an IDE, running that too will most likely enable JPowerShell to run with administration privileges.

I only confirmed this with Intellij IDEA.