I have a certificate in the MSMQ service Personal store and I need to grant the Network Service the permissions to access the certificate.
The only way that I know of to do it is using the certutil.exe on win2008/7 like so:
certutil -service -service -repairstore MSMQ\My "" D:PAI(A;;GA;;;BA)(A;;GA;;;SY)(A;;GR;;;NS)
However, certutil on win2003/XP does not recognize the -service parameter, so no good.
My question is how can I do it in a way that works for both Win2003/XP and Win2008/7?
I need a non interactive approach (command line utility, script, COM/.NET/Win32 API).