Run Gradle exec in admin privileges

Hi All,
I am running npm commands in gradle using exec when I tried to install windows-build-tools package which installs python fails even i run gradle command in power shell with admin privilege.

task windows {
workingDir ‘Vault.Direct.Desktop’
commandLine = [“npm.cmd”, “install”, “–global”, “–production”, “windows-build-tools”]
How can i run the command with admin privilege?


I’ve been trying to do the exact same thing. Did you find out how to do it?

No, I could not able find solution to this. I asked my devops guy to install all global npm packages manually in machine we used to build application. Sorry i wish i could be of more help.