Announcement

Collapse
No announcement yet.

Rename file before install?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rename file before install?

    How can i rename a file before it is installed to the users machine. I can change the file on the "After Install" section, but I am using serial # to determine which file is installed and cannot figure out a variable for that file to put in the "Source" file name. Thanks

    Carter

  • #2
    Re: Rename file before install?

    I have noticed that you can use a FILE > RENAME action to do this, just set the second property to be your destination directory, i.e. you would set the first field to where your original file is and then just set the second field to the new name and destination.

    That way you can both rename and move a file at the same time.

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment


    • #3
      Re: Rename file before install?

      That is what I am currently doing. It works fine if I just have one serial# file, but what if I have multiple serial # files. Example - during install a serial # is required to install a selected file. I have 300 different serial #'s and am only installing one of those. How do I tell it to change the name of the file based on that serial #.

      Comment


      • #4
        Re: Rename file before install?

        I'm not sure that I totally understand what you need to do, however from what I can see, you are going to need to use the Rename file action anyway.

        You can use variables anywhere in the Source and Destination fields of the Rename action. Therefore you can use a variable as the destination filename that is set somewhere else given some condition, or even the whole path.

        I think I may need a little more explanation, or perhaps an example.

        Comment


        • #5
          Re: Rename file before install?

          cool, let me see if I can explain this any better. Lets say that the main file to be installed is called mystore.exe. Now I have MANY catagories, all assosiciated to a particular serial #. Examples would be ( apples, oranges, bannanas, meat). The mystore file is looking for a file name "food". When I put in the serial # for oranges, I want to install oranges and change its name to food (or change it before its installed). That way I can have one installer that could install several different versions of the mystore.exe. The problem that I am running into is the if I use the rename file after install, the installer doe not know the file path (crograms\mystore\oranges vs. crograms\mystore\apples) based on which serial # was installed. Did this make any sense. Hope so? I know that I am close to achieving what I need.

          Thanks
          Carter

          Comment


          • #6
            Re: Rename file before install?

            By the sound of it, you may have to create a whole wack of conditions that set a variable, however there has to be a better way than that. Send me your project file(.sf6) so I can see exactly what you currently have. I may be able to suggest an alternate design for you.

            Comment


            • #7
              Re: Rename file before install?

              Ok I actually figured it out. What I did was on the "after install" I put a "if" condition for everypassword that would then overwrite that passwords specific file. Works like a champ.

              Later
              Carter

              Comment


              • #8
                Re: Rename file before install?

                That's what I was thinking as well, however you must have a crazy amount of IF structures that you had to create. That's why I was thinking that there had to be an easier design. But in the end if it works, great!

                Comment


                • #9
                  Re: Rename file before install?

                  yeah I do have alot of if statements but its the only way I know ( with my limited coding knowledge ) to do it.

                  Carter

                  Comment

                  Working...
                  X