[wix-users] Access Denied: Custom Action Fails in Folder Where it Was Extracted
jhalvax at c2ti.com
Thu Jun 8 09:09:27 PDT 2017
I would like to know if it is possible to configure the location where Custom Action DLL's are extracted. Googling this I see several locations:
I inherited quite a large VB .Net solution with numerous projects and am now trying to get a handle on the WiX installer code that is part of it. In our environment the CA DLL's are extracted to the first location mentioned above. It is my understanding that the installer would have used the environment Temp variable to determine this location.
SFXCA: Extracting custom action to temporary directory: C:\Users\Name\AppData\Local\Temp\MSIB590.tmp-\
SFXCA: Binding to CLR version v2.0.50727
The government organization that I work for apparently has set restrictive IO settings in that folder
because I get the following error:
Calling custom action Product.Setup!Product.Setup.CA.InstallSequenceCustomActions.PiaCheck
Error: could not load custom action class Product.Setup.CA.InstallSequenceCustomActions from assembly: Product.Setup
System.IO.FileLoadException: Could not load file or assembly Product.Setup, Version=0.0.0.0, Culture=neutral, PublicKeyToken=6a5b4d0c305779fe' or one of its dependencies. Access is denied.
File name: Product.Setup, Version=0.0.0.0, Culture=neutral, PublicKeyToken=6a5b4d0c305779fe' ---> System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.AppDomain.Load(String assemblyString)
at Microsoft.Deployment.WindowsInstaller.CustomActionProxy.GetCustomActionMethod(Session session, String assemblyName, String className, String methodName)
We cannot change these IO settings and therefore would like to use a different folder for the extraction of the CA (preferably C:\Temp).
Is that possible? Looking at the different locations above the installer apparently uses different locations for other users; does Windows Installer decide that or is that a setting that a developer can set?
(The person doing the install has admin rights on the machine where the software is installed)
I tried to use the Impersonate="no" attribute to run with elevated privileges, but that has no effect because this is not a deferred action.
More information about the wix-users