Windows services and certificates

Creating and installing Windows service

Using command console, the following commands can be used to create or delete a Windows service.

# Create a new service 
sc create "[agent_name]" binPath= ""
# Delete a service by name
sc delete "[agent_name]"

Granting permissions to certificate

To following instructions can be used to grant permission a user to a certificate that is stored in Window’s certificate store:

  1. Open Microsoft Management Console (MMC.exe) using Admin rights
  2. Navigate to the Certificate that you want to grant permission to
  3. Right-click the certificate to open sub-menu ManagerPrivateKeys
  4. Add NETWORK SERVICES to the permissions
Manage Windows certificates using MMC.exe

Or using command console:

cd C:\Program files\Windows Resource Kits\Tools
winhttpcertcfg –g –c LOCAL_MACHINE\My –s [certname] –a ASPNET
winhttpcertcfg –g –c LOCAL_MACHINE\My –s [certname]  –a NETWORKSERVICE

Leave a Reply

Your email address will not be published. Required fields are marked *