cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sean_larkin
Level 4

get path for common files

Inside an installscript I would like to get the full path to the common files for the installtion. What function is best for doing this? I'm new at this, but I found the MsiGetSourcePath function and had some trouble understanding the inputs and there are no example... anyone have an example. What I am trying to do is call an executable inside the installscript and I have a couple of options. The .exe file can be either placed in the common files folder for the installation or be placed in the same folder that the MSI installation file exists (i.e. the .exe file would be in the same folder as the installer file when given to a user for installation.) What's the best way to do this?

Thanks,
Sean
Labels (1)
0 Kudos

(1) Reply
RobertDickau
Flexera Alumni

How do you determine whether the EXE is in Common Files or in the installation source? In any case, once you know, perhaps you could use CommonFilesFolder in your script, or use MsiGetProperty or MsiGetTargetPath to get the value of the SETUPEXEDIR or CommonFilesFolder property?

Keep in mind that an action referring to a file that's being installed with a component needs to be set for deferred execution after InstallFiles, and conditioned to run only during a first-time installation...
0 Kudos