Reply to Thread

Post a reply to the thread: If Then Logic

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 05-06-2013, 08:50 AM
    linder

    Re: If Then Logic

    BTW, but of course, the above detection logic is suboptimal. If you have full control over the deployment process, I would not do it this way. The recommended method is to write/read this kind of information to/from the Windows registry.

    Friedrich
  • 05-06-2013, 08:22 AM
    linder

    Re: If Then Logic

    What determines the "correct" location? Does the correct location contain the service name? For example: C:\Program Files (x86)\CoolApp\Accounting Service A

    In this case, your logic to use "If Variable Contains..." is okay and can be used to check if the entered folder name contains a specific service identifier. The "If Folder" Statement can only check if a specific folder does exist.

    Friedrich
  • 05-06-2013, 08:07 AM
    ender

    Re: If Then Logic

    Trying to make a single installer; for users who have the service installed and for thoes who do not have the service installed. Want to avoid having two seperate installers. If the installer detects the service it will prompt for the valid folder to backup associated with the service. If the service is not detected, it will skip this logic.

    The "If Folder" works great, but does not verify if its the correct folder. Trying to add an additional validation check to verify the user provided the correct location.
  • 05-06-2013, 07:33 AM
    linder

    Re: If Then Logic

    So the user enters (or selects) an existing folder in one of your wizard dialogs and you check if that folder contains a specific "service" name?

    Friedrich
  • 05-06-2013, 07:21 AM
    ender

    Re: If Then Logic

    If the service is detected I was trying to make it required to backup files related to the service; if the service was not detected, it woulld skip the logic.

    It will work using the if the folder exists, however, was trying to make it error proof by adding an addtional check.

    For example, if the Parent folder has multiple sub-folders, and the wrong one is choosen it will still be a valid path. Was trying to find a way to add an extra control; which is why I was trying to add the speific name of the folder required.
  • 05-06-2013, 12:14 AM
    linder

    Re: If Then Logic

    Hello,

    To be frank, I don't understand the question, sorry

    Why are you using "If %SERVICE% Equals "1" on Position "1" Then"? Only use this to verify the state of a bitfield.

    And I don't understand the logic behind the code snippet. What is it supposed to do? Let me know what you need and we can develop a small demo for you.

    BTW, I would suggest to download the "Learning SetupBuilder Part I" manual. It comes with quite a few interesting examples, tips and tricks.

    Friedrich
  • 05-05-2013, 09:27 PM
    ender

    If Then Logic

    I'm trying to have a validation check for folder name based on if a service is installed. I can get it to partially work, however its not 100%.

    The attached screen shot is not the one i started with, but is an example. The logic is only half working; only can get one validation to work. I have tried If Then, If And Then, etc.

    Thoughts?

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •