Before you shutdown, press control Shift and Escape at once to bring up the Task Manager. Under the Applications tab, see what's running and click to End Task from the File menu. Checking under the Processes tab is a little harder and is a process of elimination. Double click on the header of the CPU column to bring the highest users to the top and start by closing the first one, note its name and shutdown. Keep doing that until you work out what's casuing the delay.