bucketbuster Posted March 25, 2005 Share Posted March 25, 2005 I want my cleanup.cmd, after it is finished, to be deleted.Without user interaction.How do I do that?This is a part of my cleanup.cmd:CLS@echo offTITLE Windows XP SP2 - Cleanup after Unattended InstallationCLScolor 0AECHO.ECHO Cleaning up ECHO.ECHO.ECHO.del /f /q stuffrd /s /q stuffEXIT Link to comment Share on other sites More sharing options...
jondercik Posted March 25, 2005 Share Posted March 25, 2005 just have it delete itself, it should work. Link to comment Share on other sites More sharing options...
gunsmokingman Posted March 25, 2005 Share Posted March 25, 2005 Here Is The Thread If You Need Instruction To Edit It.ThreadHere This Is A Link To A Silent Clean Up VBs Script.Silent Clean Up Link to comment Share on other sites More sharing options...
totoymola Posted March 25, 2005 Share Posted March 25, 2005 DEL CLEANUP.CMDEXITWhat I want to know it how to make a self destruct file. For example, a .jpg file. So it will delete itself after closing it. Link to comment Share on other sites More sharing options...
Yzöwl Posted March 25, 2005 Share Posted March 25, 2005 for a batch file to delete itself all you need is the following right at the end (no exit necessary):del %0try this as a test, copy /paste the following into a file and name it anything.cmd or anythingelse.bat@echo offdel %0 now double click it! Link to comment Share on other sites More sharing options...
gunsmokingman Posted March 25, 2005 Share Posted March 25, 2005 (edited) Here A VBS code That Will Delete Anything ListedBlue Is The File Or Folder These Must Be In QuotesOn Error Resume Next Set Action = CreateObject("Scripting.FileSystemObject") Action.deleteFile ( "NAME THE FILE" ) Action.deleteFolder ( "NAME THE FOLDER" )This One Ask A Question Do You Want To Delete!On Error Resume Next Set Action = CreateObject("Scripting.FileSystemObject") Ques=Msgbox("Would You Like To" & vbcrlf & "Delete A File Or Folder", 4 + 64,"Delete What?")If Ques = 6 then Action.deleteFile ( "NAME THE FILE" ) Action.deleteFolder ( "NAME THE FOLDER" )elseend ifIf Ques = 7 Then msgbox "User Selected To Quit" & vbcrlf & "Not Deleting Nothing", 0 +32,"Good-Bye"Else End IfThis Is For The Question Delete VBs Edited January 4, 2006 by gunsmokingman Link to comment Share on other sites More sharing options...
bucketbuster Posted March 25, 2005 Author Share Posted March 25, 2005 Thanks, guys Link to comment Share on other sites More sharing options...
hammermtl Posted March 26, 2005 Share Posted March 26, 2005 I was also thinking about an auto destruct for some time now.Let's say I put the unattended install on a CDRW is there any way to create a command to use the cd drive to delete everything on the cdrw after the install is complete?ThanksJosh Link to comment Share on other sites More sharing options...
Vadikan Posted March 26, 2005 Share Posted March 26, 2005 I think you can use cdburn.exe. Link to comment Share on other sites More sharing options...
blinkdt Posted March 27, 2005 Share Posted March 27, 2005 @Yazowl Very nice. I'll be incorporating that trick into all of my batches, thanks. Link to comment Share on other sites More sharing options...
Rekenaar Posted March 27, 2005 Share Posted March 27, 2005 @Yzöwl - thanks for that one! Link to comment Share on other sites More sharing options...
Bâshrat the Sneaky Posted March 27, 2005 Share Posted March 27, 2005 Thanks, Yzöwl! Link to comment Share on other sites More sharing options...
Yzöwl Posted March 27, 2005 Share Posted March 27, 2005 Thanks all,...have you been asleep for two days? Link to comment Share on other sites More sharing options...
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