Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSDeploy RunCommand Priviliges

Tags:

msdeploy

I am trying to use the -presync:runCommand option in MSDeploy and no matter what I try to run, I get the same error back:

Error: A required privilege is not held by the client.

I've tried a handful of items to execute, and none of them work. Ideally I want to execute an exe on the server as such:

-presync:runCommand=C:\MyExecutable.exe,dontUseCommandExe=true

I've also tried

-presync:runCommand=C:\TestScript.bat

And the sample from their documentation

-presync:runCommand="net stop w3svc"

Thanks in advance.

like image 783
Luke Avatar asked Dec 07 '10 19:12

Luke


1 Answers

I found the answer, and it turns out I had already halfway completed it. In the link I provided in my question, they mention how to add privileges to the WMSvc account, like so:

sc privs wmsvc SeChangeNotifyPrivilege/SeImpersonatePrivilege/SeAssignPrimaryTokenPrivilege/SeIncreaseQuotaPrivilege

What it failed to mention is that you must restart WMSvc for this to take affect.

like image 148
Luke Avatar answered Oct 24 '22 11:10

Luke