Skip to content

Start DCD with Windows

Basile Burg edited this page Aug 23, 2015 · 1 revision

DCD can start at the same time as Windows with the help of a simple VB script

Create the script

Create a new file and paste the following script:

set service = GetObject ("winmgmts:")
for each Process in Service.InstancesOf ("Win32_Process")
	if Process.Name = "dcd-server.exe" then
		wscript.quit
	end if
next
set proc = CreateObject("Wscript.Shell")
proc.Run "dcd-server.exe", 0, False

Save the file with the vbs extension. This script has the advantage not to create a console window.

Create a task executed after Windows boot

You have several choices.

  • Registry:

Typically you can execute something at startup by creating a new string (REG_SZ) value in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run. Set the name to DCD or something similar and as value put the script file name (including its path). This should be avoided if the dcd.conf file is well filled otherwise it could slow down the system startup.

  • Scheduled task:

Execute taskschd.msc and follow the wizard to create a new task for the script saved previously. The execution can be arbitrarily delayed (for example 2 minutes after session logon). This is the best choice if you don't want the server initialization to have an impact on the system start up.