phaolo Posted August 5, 2008 Posted August 5, 2008 (edited) I read that cmdlines.txt supports only simple commands, but I never found which ones.Should checkdisk work from it with these arguments?echo y| "%SYSTEMROOT%\system32\chkdsk.exe" "%SYSTEMDRIVE%" /f /rI used "echo y|" because I don't know if checkdisk will start normally or it will need an answer at setup T12. If it cannot work I'll call an external batch script, but I would prefer to avoid another file for a single line..-----About the temp folders, I'd like to clean them before a defrag in RunOnceEx using these commands (this code is for a batch file):del "%TEMP%\*" /s /q /fdel "%SYSTEMROOT%\Temp\*" /s /q /frd "%SYSTEMROOT%\Temp" /s /qmd "%SYSTEMROOT%\Temp"defrag.exe %SYSTEMDRIVE%I added an option to remove\recreate "%SYSTEMROOT%\Temp" to get rid of all empty directories (I'm using it for self-extract archives).The problem is that I don't know if files that will be used on next reboot by some setups will be maintained (are them all locked?). Or can I delete those folders without worries?-----Can you give me a hint? Edited August 5, 2008 by phaolo
Martin H Posted August 7, 2008 Posted August 7, 2008 Keep in mind also that cmdlines.txt doesen't support environment-variables
phaolo Posted August 7, 2008 Author Posted August 7, 2008 (edited) Uh, good to know, thanks!But then, should the command work in this way?echo y| chkdsk.exe C: /f /ror thischkdsk.exe C: /f /r---Does someone know something about the defrag question? Edited August 7, 2008 by phaolo
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now