Jump to content

Delete Folder End Install ( Help )


Recommended Posts


Make a "Remove.cmd" for removing folder with subfolder..

RD /S /Q "Folder Path"
DEL /Q /F %systemdrive%\Remove.cmd

Example Of RunOnceEX.CMD

REG ADD %KEY%\095 /VE /D "Removing Temporary Files and Restarting Computer" /f
REG ADD %KEY%\095 /V 1 /D "%systemdrive%\WINDOWS\System32\Remove.cmd" /f
[color=#FF0000]REG ADD %KEY%\095 /V 2 /D "psshutdown -t 40 -r -f" /f[/color] --- If You use PSSHUTDOWN tool for Restart your computer..

Link to comment
Share on other sites

Make a "Remove.cmd" for removing folder with subfolder..

RD /S /Q "Folder Path"
DEL /Q /F %systemdrive%\Remove.cmd

Not quite correct
RD/S/Q "Folder Path"
DEL/F %systemdrive%\Remove.cmd

The /Q switch is incorrect

In your case, to delete your batch file, you could use,

DEL %0

as the last line of your batch file.

However, as most users are using a cleanup.cmd file and cmdow and trying to remove a folder named install in the root of their system drive, how about this for an idea?

  • place your command file into the Install folder you are trying to remove and have this as the last line in your cleanup.cmd

RD/S/Q "%~DP0"

  • It will delete the batch file's containing folder, obviously also removing the batch file too!

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