Daddyjaxx Posted November 19, 2004 Posted November 19, 2004 I may already know the answer to this, but here goes anyways. My cleanup.cmd never finishes everything. It seems like when it gets done deleting %systemdrive% \install, everything stops. Here's the dumb part...... could it be because that is where my cleanup.cmd is.... in the C:\install folder....so when that folder is deleted, so is my cleanup.cmd.
Synapse Posted November 19, 2004 Posted November 19, 2004 (edited) The end of your "install" batch file should look like this...*INSTALLING STUFF ABOVE THIS*ECHO.ECHO Restarting the PC in 1 minute...shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"ECHO.ECHO Deleting Temp Installation Files...RD /S /Q %systemdrive%\DriversRD /S /Q %systemdrive%\installEXITIf it looks similar, i don't see why it would hang on deleting your cleanup.cmd... btw.. your not having your "cleanup.cmd" delete the C:\Install folder are you?If you've made a Cleanup.cmd file to automate the process of deleteing shorcuts and un needed folders (not the install folder) then i would run it like this...Install.cmd*INSTALLING STUFF ABOVE THIS*ECHO.ECHO Deleting Unnessesary Files and Folders...start /wait cleanup.cmdECHO.ECHO Restarting the PC in 1 minute...shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"ECHO.ECHO Deleting Temp Installation Files...RD /S /Q %systemdrive%\DriversRD /S /Q %systemdrive%\installEXITThen in Cleanup.cmd...@Echo offclsECHOECHO Deleting Unnessesary Shortcuts and Folders... Please Wait...*have all your delete settings here* (not to delete the install folder though)ExitNow what will happen, is when it hits the start /wait cleanup.cmd line in your install.cmd file it is going to start up the cleanup.cmd *that deletes files and folders* then the cleanup.cmd will exit when its finished. and continue on the install.cmd file. and will eventually hit the /RD /S /Q %systemdrive%\install folder which will clean up that mess. Edited November 19, 2004 by Bi0haZarD
MCT Posted November 19, 2004 Posted November 19, 2004 I may already know the answer to this, but here goes anyways. My cleanup.cmd never finishes everything. It seems like when it gets done deleting %systemdrive% \install, everything stops. Here's the dumb part...... could it be because that is where my cleanup.cmd is.... in the C:\install folder....so when that folder is deleted, so is my cleanup.cmd.of course thats the reason.. u cant run something thats deleted lol- Steve
gunsmokingman Posted November 19, 2004 Posted November 19, 2004 (edited) Add This to the end Of your cmd It produces A Inputbox Than you fill it in with,what folder you want removed.Than it removes the folder than it cleans up after it self.I am not a coder I have Only Tried This On my Machine And It Seems To Workclsmode con: Cols=45 Lines=3color a9 > %SystemDrive%\DelThis.vbs echo Dim FSO, Folder, CF >> %SystemDrive%\DelThis.vbs echo set CF = (CreateObject("Scripting.FileSystemObject"))>> %SystemDrive%\DelThis.vbs echo Set FS = CF>> %SystemDrive%\DelThis.vbs echo CF=Inputbox("Type In The Folder You Want Deleted","Deleting the Folder: ","")>> %SystemDrive%\DelThis.vbs echo MsgBox CF^&"",vbokonly+64,"Deleting">> %SystemDrive%\DelThis.vbs echo Wscript.sleep 500>> %SystemDrive%\DelThis.vbs echo folder=""^&Cf>> %SystemDrive%\DelThis.vbs echo fs.DeleteFolder "" ^&Cf>> %SystemDrive%\DelThis.vbs echo Delete=""^&Cfecho echo off > %SystemDrive%\CleanUp.cmdecho cls >> %SystemDrive%\CleanUp.cmdecho mode con: Cols=55 Lines=5 >> %SystemDrive%\CleanUp.cmdecho color B2 >> %SystemDrive%\CleanUp.cmdecho start /w %SystemDrive%\DelThis.vbs >> %SystemDrive%\CleanUp.cmdecho del %SystemDrive%\DelThis.vbs >> %SystemDrive%\CleanUp.cmdecho del %SystemDrive%\CleanUp.cmd >> %SystemDrive%\CleanUp.cmdecho ping -n 1 127.0.0.1^>nul >> %SystemDrive%\CleanUp.cmdcall %SystemDrive%\CleanUp.cmdHere One That Makes And Deletes Folders And Cleans Up After It SelfI Have Added The Option Of Keeping The folder That was Made, And It willMake A Folder On Any Drive. Edited January 5, 2006 by gunsmokingman
Synapse Posted November 19, 2004 Posted November 19, 2004 gunsmokingman, whats the point of the "Ping" Command in that?
BritishBulldog Posted November 19, 2004 Posted November 19, 2004 The simple answer is 'YES' that is the reason, no fancy programming will helpyou need to put the cleanup.cmd in the $OEM$ folder directly and call it up from there.How do you call it up now?through RunOnceEx?if so you need to call it up directly from the cd.for example like this but not in the install directory, it wont delete itself and will stop.%CDROM%\$OEM$\cleanup.cmd
RyanVM Posted November 19, 2004 Posted November 19, 2004 Since you're new here, you should really be versed in the rules before posting. One of the rules is:12. Very often we see meaningless subjects in topic title. They give no clue of what the posts are all about. For example:- Oh no!- Help- I'm mad- Please help- Question- I need your help- Hmmmm ....This should be avoided. Users should enter something more specific in topic title so that it is easier for others to help.A few good examples:- Strange problem with DirectX9b redist- RunOnceEx install problem (double installation)- Change Internet Explorer's Icon back to defaulthttp://www.msfn.org/board/index.php?showtopic=18408Please do we who post here frequently a favor by reading those and keeping mind of them in the future. Thanks
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