See if the following link helps: http://www.computerhope.com/issues/ch000380.htm
I'd suggest ruling out the virus and memory issues first, via a scan with current definitions, and by running the Dell Diagnostics tests on the memory. Details are in your system documentation.
You could try posting this in the following Software - Windows 98/95/3.11/DOS board.
The "R6009: Not Enough Space For Environment" run-time error is caused when a program successfully loads into memory and then attempts to
load a copy of the environment and the argument list into the near heap. If the near heap does not have enough room for one, the other, or both, R6009 is generated.
In english, there are some conflicting entries in either your autoexec.bat or Config.sys files.
Click Start, Run, MSCONFIG, OK, For troubleshooting purposes, you can disable both autoexec.bat & config.sys on the general tab (uncheck them both) then click OK, yes to restart. Boot back up then shutdown. If hte error goes away, then you've confirned it is a setting in those files. Go back MSCONFIG, Click the Config.sys tab. Check half the items listed, OK, Yes to reboot. Try shutting down again. If the error occurs, you localized the error to the items you just checked, uncheck half of them & continue in this manner until you isolate the problem setting. If you enable all settings in Config.sys & the error no longer occurs, thten try the same procedure with Autoexec.tab.
Warning, some values in these folders are required for your antivirus. Make sure that when you finish troubleshooting that you antivirus is functional.
Inspiron E1505 Windows 10 / XPS 10 Windows RT
Dimension 8400 Windows 7/8
XPS One. Core2 Duo @ 2.2GHz. 2 GB DDR2-667. WD2500AAJS 250GB SATA. Intel GMA 3100 video. 20" WSXGA HD LCD. 2 Megapixel Webcam. 8X DVD±RW. 8-in-1 Media Reader. 802.11 a/b/g/n wireless. Integrated High Def Audio. Internal Bluetooth 2.0. NTSC/ATSC TV Tuner. Windows 7 Professional SP1.