how to resolve setup crash issue when launch it?

Am using Windows Server machine 2012 R2 machine to take a setup (exe) and using Wix v3.10.

When i run the burn executable taken from Windows Server 2012 R2 machine in any machine, setup crashed with the error as "System.IO.DirectoryNotFound" not found.

On further investigating this, this exception was occurred during the retrieval of burn and bootstrapper related files(.ba folders from temp location) using WixBundleProviderkey. Because, the .ba folder was existing in some other (some Guild(folder name)} name instead of the required directory in temp location. This issue is occurred only when the setup taken from Windows Server 2012 R2 machine and this is not occurred in some other windows machine if we took setup from it.

Actual path in which .ba folders exists: C:\Users\server\AppData\Local\Temp\2{32DB2298-79D9-4816-9BD6-ABA4271CCA2F}

Application Searching path of .ba folder : C:\Users\server\AppData\Local\Temp\2{36823a7e-b6d2-4db1-b0d1-212cdf7bd669}\

Could anyone please let us know why this issue occurring in Windows server machine?

What is the main function of WixBundleProviderkey?

Below is my code where am facing issue while launching the setup

string baFolder = System.IO.Path.GetTempPath() + SyncBA.Model.Bootstrapper.Engine.StringVariables["WixBundleProviderKey"] + "\";

Upvotes: 0

Views: 244

Answers (1)

Sean Hall
Sean Hall

Reputation: 7878

This is due to the security mitigations added in v3.10.3. That temp folder is no longer created using the bundle's id, it's a random guid. You should get the location of your BA in a different way, such as AppDomain.CurrentDomain.BaseDirectory.

Upvotes: 1

Related Questions