Download WinEject here. 3] Close CD/DVD tray using the command line You can use the NirCmd.exe program from Nirsoft for a number of tasks, including opening and closing the DVD tray/door.