Redemption Outlook VBA reference always getting reset in Citrix - vba

Every time I enable the Redemption Outlook library in my Access VBA (tools -> references), it seems to get reset when I log out of Citrix. Is there any way to keep it as a persistently-added reference like the others?

It probably means the HKCU registry gets reset. Try to register Redemption with regsvr32.exe from an elevated command prompt - it then will install itself in HKCR.

It's more likely that the registry entry for this reference simply isn't getting saved permanently when Citrix exits. Talk to your Citrix admin about adding the registry entries permanently. Otherwise, rather than running your Access app directly in Citrix, consider running a script in Citrix (vbscript or Powershell) which adds the reference for this to the registry at runtime and then starts your app.

Related

How to prevent a VSTO Office Add-In from automatically getting disabled?

We run some custom add-ins in Outlook application and occasionally find that the Outlook application disables them; I then have to manually go to the application settings and re-enable them on each users PC. We are running Microsoft Office 365 click to run applications. I have tried the following but nothing seem to work 100% of the time.
I have tried setting the "AddinList/ProgID" REG key to 1 (always enabled) as described here - https://learn.microsoft.com/en-us/office/vba/outlook/concepts/getting-started/support-for-keeping-add-ins-enabled.
I have also tried setting a number of registry key combinations as described here - https://www.konnectemail.com/prevent-outlook-add-in-from-getting-disabled
Is there a specific way to tell the office application to NEVER disable a particular add-in regardless of the Office version?

Unable to disable the Add-in in Outlook 2010

I am developing a vsto COM Add-in with form region for Outlook. It works fine. However, I am facing problems disabling the Add-in in Outlook 2010.
From the File Menu > Options > Add-ins > COM Addins (dropdown) , I am unchecking my Add-in. But when I restart Outlook, the add-in is enabled again. If I check in the COM Addins list, its again enabled. Even the registry entries indicate that the Add-in is enabled again. Does anyone know what might have caused this? Can enabling and disabling be handled in my code, or will it be taken care by Outlook itself.?
If the addin is installed in both HKCU and HKLM, make sure you disable it in the HKLM registry hive.
Typically when any changes made in the host application run under regular user privileges are written to the HKCU hive. For example, if the add-in is registed in the HKLM hive any changes in the UI are written to the HKCU hive due to the fact that the host application was not launched with admin privileges (which is required for writing to the HKLM hive). See Registry Entries for Application-Level Add-Ins for more information.
P.S. Try to run Outlook with admin privileges and see the difference.
As it turns out, its is a bug in Office 2010 Professional. To disable the add-in, you need to run Outlook as an admin, and then disable the add-in.

Office Addin gettin disabled if network drive is inaccessable

I have an outlook addin which is located on the network drive for all users to use.
When network fails may it be because of a cable that plugged out, or a system issue, if at that moment, the user launches Outlook (when no network is available), outlook automatically ticks off the addin out of usage.
For as long as the user doesn't enable it back, the add-in will not load. ever. you can close outlook , reopen it, it won't load the addin if it failed to find the .VSTO file once when outlook started.
Setting the registry value to never disable the addin, isn't effective here, because the addin is not realy disabled, its only been shut off and waiting to be reactivated manually.
I would like it to stop being shut off, or at least auto-enable it self when network is accessible. can this be accomplished without an 3rd party exe running in the background ?
Put the addin locally to each computer and equip those computers with simple script which runs on user logon and copies the addin from its network location to local directory. This will keep your addin both updated and always available.
In case if the network is inaccessible, it is the script (invisible to user), which will fail, not the Outlook. This makes a difference :)
Of course, besides the initial launch of the script, there are also possibilities to re-run it on regular basis (once a day?) when a user is logged on. This will be be effective only when Outlook is not running at the moment, otherwise the addin DLL cannot be overwritten.
It is not a good idea run from a network drive. Why not copy the dll locally when you install your addin?
Why not install locally and then write code to check the network location? If the network is available, compare the remote dll to the local one. If they are different, copy the new dll to the local machine, then adjust the registry entries for that addin. Then display a message to the user to restart the application.

Add exception to Windows Defender at install time

When running on Windows 8, our application is exceptionally slow unless we add a process exception for it in Windows Defender. (It is mostly from logging operations onto the disk.)
Is there a way to add the exception programmatically during our InstallShield installation? Calling a custom action in C# or VBScript is fine.
Actually i think you look for Add-MpPreference.
Your application is probably slow because you touch a lot of files, and each file you touch gets scanned by the defender.
I use this Powershell command two times, to excluding the exe (-ExclusionProcess) AND the files (-ExclusionPath) during installation.
If it would be so easy to add an exception to Windows Defender by using a VBScript script, Windows Defender would be no protection for your computer because any malware would simply add an exception for itself.
There are some registry keys which define if Windows Defender's real time protection is enabled or not. You can read these values to know if it is active and alert your user that the slowness is caused by Windows Defender. But you cannot modify these keys, not even running in a service with SYSTEM user. These registry keys are protected by Windows to forbid tampering.
Note that since Windows 10 the option to add exceptions to Windows Defender does not exist any more.
The only way to turn on or off Windows Defender:
Manually via Windows Defender configuration panel (MsAscUi.exe)
Install another antivirus program which disables Windows Defender automatically.
If you are interested in the registry keys read my answer in another question:
Find out if Windows Defender disc scan is running?

IIS7.5 Excel printing not working when run from server

I'm having trouble generating a PDF-file with PDFCreator from Excel macro (using VB.NET 3.5 and Interop).
Through Windows login as the domain user I can run the macro directly from Excel and everything works fine (a pdf file is printed and saved), but when published and run as the same user from server there is no printer found.
In the macro I know this can be solved by setting Application.ActivePrinter ("PDFCreator on Ne00:" in my case), which again works when I run directly from Excel but not from server. So what I wonder is how to make it possible to set ActivePrinter when running on server?
It worked with previous IIS version on the server (6.0). I have tried giving the domain user access permissions (e.g. in DCOMCNFG), the PDFCreator is set up correctly and accessible, don't really know how to approach this.
Using Office Interop from server-like scenarios (IIS/ASP.NET/Windows Service...) is NOT supported by MS - see http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2
Another point is that since windows vista there have been several security-related changed which prevent doing any "desktop-like" things (for example printing...) from a Windows Service...
Alternative to Interop:
To create PDF from Excel file there are several libraries out there which do not use Excel and work fine in server-scenarios - like Flexcel, Aspose.Cells, SpreadsheetGear...
It works even in IIS8 also.
Give Microsoft Excel Application sufficient Permission from DcomConfig (Eg-IIS_IUSRS,Network Services etc)
take care of impersonate user id and password provided In Web.xml. do not make it true if not necessary. it worked for me when i removed this.