Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

removing dirs


4 replies to this topic

TAL

TAL
  • Members
  • 77 posts

Posted 03 May 2001 - 12:12

HI,
i really need some urgent help here...

I need to remove folders that are being created after installation, and are not being removed when uninstalling. i have tried to use the removefile table, but it would only remove files. the folders are being created when running the installation, under a certin dir that is being created by the installation. i can not know the names of the dirs, since they are being created automatically.

Please advise.


(Edited by TAL at 12:13 pm on May 3, 2001)

(Edited by TAL at 1:03 pm on May 3, 2001)


Barbara

Barbara
  • Members
  • 89 posts

Posted 03 May 2001 - 15:21

I think, if You do not know the names of the directories, You will have no chance to delete them.
Are they located in a subdirectory You can get the name of ? Or maybe the application writes some registry keys which directories were created ?


TAL

TAL
  • Members
  • 77 posts

Posted 06 May 2001 - 07:15

All i can know is the name of the directory, which the sub folders would be created under.
for instance - dir_1
after the installation dir_1 would be the "father" with several "chldren" under. and the children are subdirs, with unknon names.


Leigh Ravenhall

Leigh Ravenhall
  • Members
  • 269 posts

Posted 06 May 2001 - 23:45

I haven't tested this thoroughly, but I know it works on my machine.  If you create a Custom Action that runs an InstallScript function, in the function, changed to dir_1.  Then use LaunchAppAndWait to run the following two commands:

for /r %f in (*.*) do del %f
for /r %f in (.) do rmdir %f

The first command deletes all the files in subdirectories of the current directory.  The second command removes the actual directories.  
If you use this method, make sure you check that the directory changes was completed successfully, because if these commands are run from the root directory, it will cause some problems for your machine.

Hope this helps.