0

How to add two same function in inno-setup.I mean for example if I want to delete a folder and and everything inside it I use :

DelTree(ExpandConstant('{userdocs}\A'), True, True, True)

to delete everything inside 'A'.But now I want to delete folder 'B' with Folder 'A'

I know one way to do that something this:

  DelTree(ExpandConstant('{userdocs}\Games\A'), True, True, True);
  DelTree(ExpandConstant('{userdocs}\Games\B'), True, True, True);

I want to know is there any other way to do this this in one line something like delete 'A+B' that will delete both 'A' And 'B'.

Anyone please help.

Thanks!

5
  • 1
    I don't know whether the problem is the folder you are targeting (because you missed to describe what is wrong). At least you are missing begin..end block according to the current code format, and you can lose that mres variable if you use it only once, immediately after value assignment. But I would urge you to go through some basics tutorial, like this one, if you're going to take your Inno Setup Pascal Script development seriously rather than repeating that you have no idea about it.
    – TLama
    Jun 17, 2015 at 6:44
  • @Tlama Am i write if not then please edit the answer.I am waiting.BTW thanks for the link.
    – Kushal
    Jun 17, 2015 at 9:29
  • The second block of code should work (although your indentation is still wrong, suggesting that you still don't really understand it). Verify that you are supplying the correct folder name in your actual script, since you've edited it here. Also note that at best this will only delete the files of the one user that runs the uninstaller, and not any other users -- in general it is usually preferred to not even bother asking and just leave all user files behind.
    – Miral
    Jun 30, 2015 at 6:08
  • @Miral Can you please post a fully corrected answer.So I can understand the wrong part of the code.Please !
    – Kushal
    Jun 30, 2015 at 13:05
  • 1
    It's indentation -- it's pretty obvious. Make sure that every end lines up with its corresponding begin. (plus one end that lines up with case)
    – Miral
    Jul 1, 2015 at 22:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.