Jump to content

Cleanup1 now, Cleanup2 Next Logon?


Recommended Posts

Subject says it all:

I want to run some cleanup processes right away, and some AFTER a reboot.

if i have cleanup1.cmd, and cleanup2.cmd, how do i make sure that only cleanup1 runs now, and cleanup2 runs later?

I am using WPI2.9 to call cleanup1, if that is any help...

Link to comment
Share on other sites


A self-deleting startup.cmd (or whatever name) put in Startup folder should do the job.

What's wrong with this simple idea?

because, for some reason, my commands won't delete my "pdvd" (powerdvd5) folder, and my "WPI" folder. I think because the programs are still in use.

Therefore, I think I have to delete all the OEM stuff FOLLOWING the first reboot, as opposed to during first logon, after all installations, before first reboot.

EDIT:

FYI, here's my cleanup code (it deletes everything EXCEPT "pdvd" and "WPI"):

RD /S /Q %systemdrive%\Install

Link to comment
Share on other sites

At the end of my Cleanup1, i call Cleanup2 through the following command line :

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installation des logiciels et configuration de Windows" /f

REG ADD %KEY%\101 /VE /D "Nettoyage de l'installation" /f

REG ADD %KEY%\101 /V 1 /D "%systemdrive%\Config\cleanup2.cmd" /f

It's quite simple and it works fine.

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