You used the wrong switch. No need for double-quotes. Just make a cleanup.cmd file and call it. The target directory should be empty before deleting it. DEL /F /S /Q "%AllUsersProfile%\Start Menu\Programs\Microsoft Silverlight\*.*" RD /S /Q "AllUsersProfile%\Start Menu\Programs\Microsoft Silverlight\"