Merge Module - Environment Variable

This issue has been solved. See solution.
Pragya's picture

I am creating a setup which includes 2 merge modules A & B.The merge modules install files to the:

"C:\Program Files\Common Files\A\Bin"

and

"C:\Program Files\Common Files\B\Bin"

I have a custom action "Run WiseScript From Installed File" in the wsi that is schedule to run after InstallFinalize in Execute Immediate. This custom action calls 2 bat files - A.bat & B.bat, that are installed by the merge modules in the 2 different bin directories mentioned above. These bat files basically call a tool that registers the binaries installed with both the merge modules with our parent product. The Binaries in the location B\Bin has dependencies on binaries in A\Bin. So, the path "C:\Program Files\Common Files\A\Bin" needs to be in the Environment Variable "PATH" for B.Bat to run correctly. I have tried a couple of things for this but all of them seem to fail:

1. Set the Environment variable and appended "C:\Program Files\Common Files\A\Bin" to PATH in the A merge module.
2. Set the Environment variable and appended "C:\Program Files\Common Files\A\Bin" to PATH in the main wsi.
3. Set the Environment variable and appended "C:\Program Files\Common Files\A\Bin" to PATH in B. bat file itself.

The path gets set correctly in all the 3 scenarios, but the "B.Bat" file does not recognize it during the install. In all the 3 scenarios if I run the bat file manually after the install it works fine without nay errors. Also, I manually set the environment variable on the test machine before running the install and that works fine too. I am not sure what to do to make the B.Bat file see the path variable set during the install.

Am I missing something?

Thanks,
Pragya

Pragya's picture

Resolved the issue

Solution

I was able to figure out the issue. The issue was with my Bat file. Thanks again!