.rmdir C:\windows

Your example will probably backfire due to Windows file protection. You can't just delete Windows while working in it. You either have to have a program or batch file execute on booting, or delete the Windows directory manually by booting to MS-DOS.

Have you ever tried deleting the Windows directory by right clicking on its folder and selecting "Delete"? Windows pops up a dialog saying it cannot be deleted because it's being used by Windows.

Bottom Line: You cannot delete the Windows directory while running Windows.