Can use this as baseline to automate install / setup / deployment / configuration of IBM PAFE to end users. If you don't want to run in Windows Command Prompt or Batch file, you can review the below and navigate directly to the appropriate registry keys or directories and adjust manually.
Feel free to add to the list, use in your deployments or troubleshooting.
Updates to this post:
- 2023-03-10: Unlink PAFE add-ins from Excel section is also useful to fix stubborn Run-time error '91': Object variable or With block variable not set caused by Set m_oCOAutomation = Application.COMAddIns("CognosOffice12.Connect").Object.AutomationServer (the PAFE / PAX API standard reference)
Code: Select all
taskkill /f /im excel.exe
taskkill /f /im CognosSessionMonitor.exe
Assumes PAFE is one of these, and works up to 10 add-ins.
Code: Select all
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Options" /v OPEN /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Options" /v OPEN1 /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Options" /v OPEN2 /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Options" /v OPEN3 /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Options" /v OPEN4 /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Options" /v OPEN5 /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Options" /v OPEN6 /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Options" /v OPEN7 /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Options" /v OPEN8 /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Options" /v OPEN9 /f
Code: Select all
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Excel\Addins\CognosOffice12.Connect" /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Excel\Addins\CognosOffice12.ConnectPAfEAddin" /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Excel\Addins\IBM Planning Analytics for Excel Addin (Custom Task Pane Helper)" /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Excel\AddinsData\CognosOffice12.Connect" /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Excel\AddinsData\CognosOffice12.ConnectPAfEAddin" /f
REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Excel\AddinsData\IBM Planning Analytics for Excel Addin (Custom Task Pane Helper)" /f
Code: Select all
rmdir "%APPDATA%\..\Local\Cognos\" /q /s
Code: Select all
REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Options" /v "RenderForMonitorDpi" /t "REG_DWORD" /d "0" /f
Code: Select all
:: Needed only for network locations:
REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Security\Trusted Locations" /v "AllowNetworkLocations" /t "REG_DWORD" /d "1" /f
:: How to set actual trusted location:
REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Security\Trusted Locations\Location999" /v "AllowSubfolders" /t "REG_DWORD" /d "1" /f
REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Security\Trusted Locations\Location999" /v "Date" /t "REG_SZ" /d "1/1/2020" /f
REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Security\Trusted Locations\Location999" /v "Description" /t "REG_SZ" /d "description_goes_here" /f
REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Security\Trusted Locations\Location999" /v "Path" /t "REG_SZ" /d "path_goes_here\" /f
Code: Select all
REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Options" /v "OPEN" /t "REG_SZ" /d "/R path_goes_here /f