Hello everyone I want to delete a file created by automated windows 7 crack (integrated in windows 7 DVD). I added the bold line " del /f /q %systemroot%\setup" to the script. It does delete the files in "%systemroot%\setup", but it does not restart automatically after windows installation as before adding that line. I know i messed it up (my fault). What shoul I do to make it work/restart? Thanks Script: @echo off for %%A in (C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z do ( if exist %%A\bootmgr ( if not exist %%A\setup.exe ( echo. echo Installing to drive %%A echo. if exist %%A\menu.lst attrib %%A\menu.lst -h -r -s if exist %%A\menu.lst ren %%A\menu.lst menu_lst.bak if exist %%A\grldr attrib %%A\grldr -h -r -s copy %systemroot%\setup\scripts\grldr %%A\grldr attrib %%A\grldr +h +s +r %systemroot%\setup\scripts\bootinst /nt60 %%A del /f /q %systemroot%\setup\ ) ) ) shutdown /r
If %systemroot%\setup\ is a folder, this would be a more appropriate command Code: rmdir /s /q %systemroot%\setup\ del = delete files rmdir = delete directories
. -------------------------------------------------------------------------------- Thanks Calistoga for your reply. My problem is not deleting the files and I don't want to delete the derectory. The problem is that it won't restart after adding that line. Finnishing installation the computer restarted before I added "del /f /q %systemroot%\setup" to the script. So I'm missing something with the script syntax