Hi Daniel,
Tried it BUT I cannot get and set installer properties using a deferred CA! This is shown below. I am actually using a variety of OS's Windows Server 2008 R2 is the one I am using for these tests. Does this mean then that if I use a deferred CA and call Session("CustomActionData") this will work or will I just get an exception as below? Also this means I will have to write another CA to get the custom action data and set my property from there. This sounds incredibly complex for setting a string value! Any idea what I should try next
Regards,
John
Calling custom action EncryptQSMPassword!EncryptQSMPassword.EncryptQSMPassword.CustomActions.EncryptQSMPassword
Begin EncryptQSMPassword
Exception thrown by custom action:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Deployment.WindowsInstaller.InstallerException:
Cannot access session details from a non-immediate custom action at Microsoft.Deployment.WindowsInstaller.Session.ValidateSessionAccess()
at Microsoft.Deployment.WindowsInstaller.Session.get_Item(String property)
at EncryptQSMPassword.EncryptQSMPassword.CustomActions.EncryptQSMPassword(Session session)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)
at Microsoft.Deployment.WindowsInstaller.CustomActionProxy.InvokeCustomAction(Int32 sessionHandle, String entryPoint, IntPtr remotingDelegatePtr)
Action ended 10:08:01: InstallExecute. Return value 3.
FOLLOW US
Get the latest news in Application Packaging