Jump to content

Recommended Posts

Posted (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 /r

I 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 /f
del "%SYSTEMROOT%\Temp\*" /s /q /f
rd "%SYSTEMROOT%\Temp" /s /q
md "%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 by phaolo

Posted (edited)

Uh, good to know, thanks!

But then, should the command work in this way?

echo y| chkdsk.exe C: /f /r

or this

chkdsk.exe C: /f /r

---

Does someone know something about the defrag question?

Edited by phaolo

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...