Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 3

Resolving original SourceDir while installaing as silent.

Hi All,

I have a situation which i cannot find any solution for the past few days, and before giving up.. i'm trying this forum;
The issue is: I have a basic MSI project that need to extract some archived files which are not part of the installation,
e.g. i've got 2 files:
1. Setup.exe/msi (generated by IS)
2. - which i packed manually.

the desired scenario is...
1. double click / silent run of setup.exe
2. installation will extract into cause this files are needed later on in the installation.
3. Setup.exe/msi will continue installation as this files were coming as 'support files'

The motivation behind this sort of solution is that often updates of files will not drag another release of Setup.exe.

The problem:
For extracting the file, i must resolve SourceDir, which works perfectly when my custom action is being initiate in UI sequence.
When i realized that in Silent mode this sequance is being skipped, i moved this extract custom action into exec sequance, but now SourceDir is always empty.

I've tried any other MSI property that i can think of (SOURCEDIR, SourceDir, SRCDIR, SETUPEXEDIR etc.) but non of them will give the initial path were Setup.exe was located.

Any knowing solution to my problem ?
Maybe there is another way to handle files outside the installation package ?
I'm guessing i'm not the only one that need facing this.

Thanks in advance, Gil.
Labels (1)
0 Kudos
(4) Replies
Level 13


Where do you sequence the custom action? I wonder if the problem is related to sequencing before Cost Finalize?
EDIT: Also is this a deferred custom action or immediate?
0 Kudos
Level 3

Hi DLee65,

As i said, at first the custom action was in "UI sequence", when realizing this sequence is being ignored on silent, i moved this custom action into "Exec sequence".
In Exec sequence it is the and an "Immediate Execution".

Hope this info will help you understanding the issue.

Thanks! Gil.
0 Kudos
Level 13

Try sequencing it later in the exec process and not as the first action. When running in silent mode I do not think it can resolve paths before cost finalize.
0 Kudos
Level 2

I'm new to the forums and am just as confused with the SRCDIR and SOURCEDIR. I have the same want and need. I have one setup.exe and a test.jpg. After executing the setup.exe I want to copy the file with the setup.exe (test.jpg) to the target location. The reason its not embedded is cause i need to allow others to change colors within a tool i'm using. When I use the InstallDir it works great and copies to the target location but I am having problems when trying to use the SRCDir. It uses the %temp% location of where the files were extracted instead of where the setup.exe file was executed.

Anyone have any ideas on how to bypass this? I've even tried moving the sequence around with no luck. I tried installexec sequence after the cost finalize but can't seem to figure out what settings i need to change.

All the forums and help say SRCDIR should give me where the EXE is.

thanks in advance.
0 Kudos