How to Install Cogent DataHub as a Service using the Command Line
How can I install the DataHub as a Service using the command line?
You can use DataHub to install itself as a service. To ensure you have the correct configuration folder, set the global configuration folder registry entries first, then install the service like this from the command prompt or batch file:
reg add "HKLM\SOFTWARE\Cogent\Cogent DataHub" /reg:32 /t REG_SZ /v "ConfigPath" /d "C:\dlpc\datahub_config"
reg add "HKLM\SOFTWARE\Cogent\Cogent DataHub" /reg:64 /t REG_SZ /v "ConfigPath" /d "C:\dlpc\datahub_config"
"C:\Program Files\Cogent\Cogent DataHub\CogentDataHub.exe" /regservice
Once the service is installed you can modify its settings using sc.
To uninstall DataHub as a service:
sc stop "Cogent DataHub"
CogentDataHub.exe /unregservice /regserver
and then optionally delete the ConfigPath registry entries.