// If your activity returns a value, derive from CodeActivity<TResult> // and return the value from the Execute method. protected override void Execute(CodeActivityContext context) { //(Workspace.Get(context)).TryGetLocalItemForServerItem( RegistrationHelper registrationHelper = new RegistrationHelper(); string appName = ApplicationName.Get(context); string tlb = TLB.Get(context); string comAssemblyPath = COMAssembly.Get(context); if (InstallAssembly.Get(context)) { registrationHelper.InstallAssembly(comAssemblyPath, ref appName, ref tlb, InstallationFlags.Default); ApplicationName.Set(context, appName); TLB.Set(context, tlb); } else { registrationHelper.UninstallAssembly(comAssemblyPath, appName); } }