cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ChristopheOce
Level 7

same file on same folder ?

Hi,

I have a basic msi project, in this project i have some folder and file of course.

i must to add a file in the node file and folder but this file exist yet !
the file i must to add is different inside of course but the name of this file is the same and a condition will be place for to install one or other!

I can place the file with a component, but when i build the project i have a warning and installshield tell me, the file already exist !

my question is simply,
how i can place two file with the same name in a same directory ?
is it possible ?

Thanks
Christophe
Labels (1)
0 Kudos
(9) Replies
ElenaN
Level 6

Hi

Actually what the problem: you got warning, not error.
InstallShield just warn you that installation conditions for files with the same name should be alternative to each other
0 Kudos
ChristopheOce
Level 7

Hi ElenaN,

Yes i have a warning message who tell me there is also a file in the same directory with the same name!!

I have two separate componenet in installdir, each component has the same file name. Inside the file the contains is different !
A condition has been place for each = > PROPERTY = 1 and for other PROPERTY <>1

When i build the package, i have a warning message and if a look in the release package there is one file NOT TWO !
that normal because it's impossible to have the same file name at the same place !

If i install my product i have always the same file who is installed often if the property is 1 or null !!

For to resolve this problem, i have created two folders inside the package.
each folders contains a file.

while i install the product i have a custom action (installscript) who checks the PROPERTY (checkbox) and if the property exist i copy the file instead i copy other file.

Is there another way !?

Thanks in advance
Christophe
0 Kudos
cbragg
Level 7

Simply install the file to the same location but use two different components for the files, each with a different install condition. If you have some complex custom action to decide which one to install then just modify that action to populate a property instead and condition the components relevant to the property value.

You will end up with a build/validation warning as a nice prompt in case you have done it by mistake, but you can ignore that as long as your conditions are set so that there is no scenario where they may end up both being installed
0 Kudos
ChristopheOce
Level 7

Hi cBragg,

hm i'm a beginner but i've try and that never works !

i have create a test project basic msi.
On left pane, setup design i added two component and rename it
comp_1 and comp_2

on each component i have added the same file , but don't forget the contains on the file are different !
Condition :
comp1 => LEVELPPD = 1
comp2 => LEVELPPD <> 1

I have added a checkbox (PROPERTY => LEVELPP) on dialog readytoinstall
On property manager i have deleded the property LEVELPPD.
As when i run the project the check box is NOT CHECKED.
Now if i check the checkbox the instlaller will be install comp_1

oK until now all is allright i think 🙂 !

When i build the project, if i open the release product => product configuration => release 1 and so on, i see there is on my project one file NOT TWO !

i launch my project check or uncheck the checked box but alaways same file are installed !

Thanks for your light
Christophe
0 Kudos
cbragg
Level 7

Oh I see. you dont see the uncompressed copies of the file in your release. This could be a bug or installshield has renamed one of them or moved it to an alternate location so that the release source does not clash. Have you tried installing it for real and looking at the files? Also try building the MSI as compressed just out of academic interest and see if it installs a different file for each scenario
0 Kudos
TsungH
Level 12

If you have not, you will want to provide different value in Source Location for the two components.
0 Kudos
ChristopheOce
Level 7

Hi everybody,

cbragg => i've create a new release and on the option i have selected compress, on the release folder i have several file and one file.cab !
if double click on this folder my two same file are well present file and file1.

If i test the test is ok, if checkbox is checked the right file is well installed and if the checked box is unchecked the right file is here too !

Now, this project have several release..and one of this has compress with no setup.exe!
it's for the deployment with active directory. And if i open the release folder after the build i don't have a file.cab !?!As i think my condition will not work for this release on deployment !!!

Do you think it's a bug on installshield or is it a situation normally ?

Thanks for your comments
Christohpe
0 Kudos
cbragg
Level 7

Sounds to me like a bug in that installshield cannot create an uncompressed source location containing two DIFFERENT files with the SAME name. I say bug loosely though because I think Installer is just as much to blame because if the file is installed from a media location in the media table, which one does it use??!! I thought compressed would act differently. Compressed is nicer because then users can download it easier, less files to confuse the user and obviously the size difference. If it is not a solution for you however then you could place the file in a different source location as suggested using the media table and there are plenty of websites describing the use of the media table if you search the internet for it.
0 Kudos
ChristopheOce
Level 7

Hi cbragg,

Ok thanks for your comments, i have the solution now but i have write some code in installscript language and of course perhpas with bug with some situation ahhhh 🙂 !

It will be more easy if it was possible to add to same file with the same name on the same location !

Thanks you very much for your comments and your help !
Christophe
0 Kudos