MSFN Forum: Delete Folder End Install ( Help ) - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Delete Folder End Install ( Help ) Rate Topic: -----

#1 User is offline   AHRIMANSEFID 

  • Junior
  • Pip
  • Group: Banned
  • Posts: 94
  • Joined: 14-November 05

  Posted 23 June 2006 - 05:43 PM

Hi All

ME Add Folder For Install Copy To Drive C: .
ME Need Command For End INstall Delete Folder.

Thank You

Sorry BAd LAng


#2 User is offline   T D 

  • Go MSFN!
  • PipPipPipPipPip
  • Group: Members
  • Posts: 940
  • Joined: 05-April 06

Posted 24 June 2006 - 09:28 AM

Batch file:
RD /S /Q "<path_to_folder>"
Put it in [GuiRunOnce] or RunOnceEx or a cleanup.cmd or something.
Use Google.

#3 User is offline   justhink 

  • Newbie
  • Group: Members
  • Posts: 34
  • Joined: 08-August 05

Posted 24 June 2006 - 01:29 PM

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


#4 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 24 June 2006 - 02:20 PM

View Postjusthink, on Jun 24 2006, 08:29 PM, said:

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!


#5 User is offline   AHRIMANSEFID 

  • Junior
  • Pip
  • Group: Banned
  • Posts: 94
  • Joined: 14-November 05

Posted 24 June 2006 - 06:38 PM

Thank You All

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy