Run Gradle exec in admin privileges


(Shiva Kumar K R) #1

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 {
doLast{
exec{
workingDir ‘Vault.Direct.Desktop’
commandLine = [“npm.cmd”, “install”, “–global”, “–production”, “windows-build-tools”]
}
}
}
How can i run the command with admin privilege?