MSFN Forum: cleanup cmd - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

cleanup cmd how to? Rate Topic: -----

#1 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 16 June 2004 - 10:21 AM

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:\

Quote

@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



#2 User is offline   valter 

  • Professor
  • PipPipPip
  • Group: Members
  • Posts: 427
  • Joined: 15-June 04

Posted 16 June 2004 - 10:52 AM

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.

#3 User is offline   Alanoll 

  • CODE tags people, CODE tags!
  • Group: Patrons
  • Posts: 5,496
  • Joined: 25-September 03

Posted 16 June 2004 - 11:01 AM

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

#4 User is offline   valter 

  • Professor
  • PipPipPip
  • Group: Members
  • Posts: 427
  • Joined: 15-June 04

Posted 16 June 2004 - 11:03 AM

Alanoll, on Jun 16 2004, 11:01 AM, said:

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

#5 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 16 June 2004 - 11:15 AM

@Alanoll
like this:

Quote

@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?

#6 User is offline   Alanoll 

  • CODE tags people, CODE tags!
  • Group: Patrons
  • Posts: 5,496
  • Joined: 25-September 03

Posted 16 June 2004 - 11:46 AM

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

#7 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 16 June 2004 - 11:58 AM

thanks klasika and Alanoll
testing in 10 min i'll let you know if its working :)

#8 User is offline   sixpack 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 515
  • Joined: 29-May 04

Posted 16 June 2004 - 12:53 PM

works :)

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy