Jump to content

cleanup cmd


Recommended Posts

my unattended cd is now perfect :) (for now)

but there's one thing to do and that is cleaning up.

i have 2 folders "install"and "Drivers" that must be deleted(with everything in it)

but i dont know how to do it because i use only a hotfixes cmd

is it possible to ad cleanup to it ?

can someone give me a exampele for deleting the folders "install"and"Drivers"

the folders are in C:\

@echo off

ECHO.

color 1e

ECHO Installeren Van Office 2003 Pro...

ECHO.

ECHO Wachten Alstublieft...

start /wait %systemdrive%\install\Applications\Office2003\SETUP.exe /qb

ECHO.

ECHO Installeren Van Q817787 Voor Windows Media Player 8...

start /wait %systemdrive%\install\hotfixes\Q817787.EXE /Q:A /R:N

ECHO.

ECHO Installeren Van Q832483 MDAC-functie kan leiden tot uitvoering van een code...

start /wait %systemdrive%\install\hotfixes\NLD_Q832483_MDAC_x86.EXE /C:"dahotfix.exe /q /n" /q

ECHO.

ECHO Installeren Van Q817778 Advanced Networking Pack...

start /wait %systemdrive%\install\hotfixes\Q817778.exe /Q /O /N /Z

ECHO.

ECHO Installeren Van DirectX 90 Security Update...

start /wait %systemdrive%\install\hotfixes\DirectX90-KB839643-x86-NLD.exe /quiet /norestart

ECHO.

ECHO PC Herstarten over 5 minuten

shutdown.exe -r -f -t 300 -c "Systeem zal afsluiten na 5 minuten om de updates bij te werken *SixPack Code Master*"

EXIT

Link to comment
Share on other sites


Sure it is, just copy this into cleanup.cmd

@ECHO OFF

RD /S /Q %systemdrive%\Drivers
RD /S /Q %systemdrive%\Install

Exit

then you can move the last line from your I believe it is hotfixes.cmd, place it in cleanup.cmd and call cleanup.cmd from hotfixes.cmd or from winnt.sif

Make sure you test it first ... just make those 2 folders on your C drive, place some dummy files inside, and run the cleanup.cmd before adding restart line.

Link to comment
Share on other sites

why do that?

just add the two RD commands directly AFTER your shutdown command. You may need to increase the time slightly based on your system....

yes sure, it's just if he plans to do some more cleanup with accounts, shortcuts and .... otherwise, all of applications, hotfixes, cleanup ... could be placed in a single file ...

Link to comment
Share on other sites

@Alanoll

like this:

@echo off

ECHO.

color 1e

ECHO Installeren Van Office 2003 Pro...

ECHO.

ECHO Wachten Alstublieft...

start /wait %systemdrive%\install\Applications\Office2003\SETUP.exe /qb

ECHO.

ECHO Installeren Van Q817787 Voor Windows Media Player 8...

start /wait %systemdrive%\install\hotfixes\Q817787.EXE /Q:A /R:N

ECHO.

ECHO Installeren Van Q832483 MDAC-functie kan leiden tot uitvoering van een code...

start /wait %systemdrive%\install\hotfixes\NLD_Q832483_MDAC_x86.EXE /C:"dahotfix.exe /q /n" /q

ECHO.

ECHO Installeren Van Q817778 Advanced Networking Pack...

start /wait %systemdrive%\install\hotfixes\Q817778.exe /Q /O /N /Z

ECHO.

ECHO Installeren Van DirectX 90 Security Update...

start /wait %systemdrive%\install\hotfixes\DirectX90-KB839643-x86-NLD.exe /quiet /norestart

ECHO.

ECHO PC Herstarten over 5 minuten

shutdown.exe -r -f -t 300 -c "Systeem zal afsluiten na 5 minuten om de updates bij te werken *SixPack Code Master*"

@ECHO OFF

RD /S /Q %systemdrive%\Drivers

RD /S /Q %systemdrive%\Install

Exit

i want only the 2 folders removed (700mb)

musti ad more time to be safe?

Link to comment
Share on other sites

oh....5 minutes should be fine....unless your system is like 233 MHZ. lol.

You don't need the @ECHO OFF, but you can leave it anyways.

The lines look file.

The reason why it's AFTER shutdown, is because if you deleted %systemdrive%\Install and yoru batch is running it, the batch would end BEFORE executing the shutdown command.

But that looks like.....

Link to comment
Share on other sites

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...