reido113 Posted March 30, 2006 Share Posted March 30, 2006 (edited) I have a startup.cmd file that runs from the startup folder on logon. It installs some registry tweaks and then it runs a cleanup.cmd that I have in the Temp folder. I have this cleanup.cmd deleting the startup.cmd file from the startup folder, but it won't delete it because the startup.cmd is still running the cleanup.cmd.Where does this end? Help...lol Edited March 31, 2006 by reido113 Link to comment Share on other sites More sharing options...
reido113 Posted March 30, 2006 Author Share Posted March 30, 2006 Or can I stop this .cmd from another .cmd? Link to comment Share on other sites More sharing options...
IcemanND Posted March 31, 2006 Share Posted March 31, 2006 I'm going to guess that you are using the CALL command to run cleanup.cmd.Like CALL cleanup.cmdWhich requires startup.cmd to remain open so that when cleanup.cmd finishes it returns to startup.cmd to run any further commands. If you don't use the CALL statement startup.cmd will continue to run and complete and close then cleanup.cmd shoud be able to delete it.Or you can create a shortcut to startup.cmd and place that in the startup folder which could be easily deleted since it is only in use when you click on it to run the cmd. Link to comment Share on other sites More sharing options...
Djé Posted March 31, 2006 Share Posted March 31, 2006 why do you need a startup.cmd AND a cleanup.cmd? Can't you just have the cleanup.cmd in the startup folder?Deleting itself upon completion:DEL /Q /F %0 Link to comment Share on other sites More sharing options...
reido113 Posted March 31, 2006 Author Share Posted March 31, 2006 I'm going to guess that you are using the CALL command to run cleanup.cmd.Like CALL cleanup.cmdWhich requires startup.cmd to remain open so that when cleanup.cmd finishes it returns to startup.cmd to run any further commands. If you don't use the CALL statement startup.cmd will continue to run and complete and close then cleanup.cmd shoud be able to delete it.Or you can create a shortcut to startup.cmd and place that in the startup folder which could be easily deleted since it is only in use when you click on it to run the cmd.I am using start as the command like this..ECHO.ECHO Cleaning up leftoversstart %systemdrive%\Install\cleanup.cmdEXITIt runs cleanup.cmd but I'm guesin thats the wrong command huh?CODEDEL /Q /F %0 If this works ... KEWL.. What a shortcut.. lemme try it out.Thanx y'all Link to comment Share on other sites More sharing options...
reido113 Posted March 31, 2006 Author Share Posted March 31, 2006 Djé Posted Today, 01:51 AM why do you need a startup.cmd AND a cleanup.cmd? Can't you just have the cleanup.cmd in the startup folder?Deleting itself upon completion:CODE:DEL /Q /F %0BINGO!!!That did the trick. Y'all never cease to amaze me. I searched (I know; i guess not good enough) for a code like this but no luck.Thanx Djé! Keep those records spinnin' 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