Outlook: VSTO does not show its initial window - visual-studio-2017

I had developed a VSTO module to Outlook using VB.NET and VS2017-Community.
At the first installation, it asked for an user authorization to install, showing the Product name and the Vendor/Manufacturer data, based on the ClickOnce compilation (I guess).
Everything rans ok...
But now I uninstalled completely this AddIn and, when I call the SETUP again (due to a newer version), the Outlook does not show this window anymore - the Ribbon is updated automatically, my custom ribbon appears, etc.
In other words: my new version is installed into Outlook seemless and runs perfectly; except for the fact of the VSTO window does not appear anymore during the Outlook load (which would be like I saw before at the 1.0.0 version of my software).
I would like to see a CLEAN installation, I mean, exactly what a user which had never installed my software would see.
Some data to enlight the problem:
1- I'm using MSI installation and uninstall. Everything runs 100%.
2- The uninstall clears all the registry keys and the application folder.
3- I saw %User%/AppData/Local/Apps/2.0 folder and, also, there are no references to my project.
4- I open REGEDIT and check the following keys. All of them are cleared (no references to my AddIn):
HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\16.0\Outlook\Resiliency\AddinList
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Outlook\Addins\
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\1x.0\Outlook\Resiliency\DisabledItems
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\1x.0\Outlook\Resiliency\CrashingAddinList
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\1x.0\Outlook\Resiliency\DoNotDisableAddinList
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\1x.0\Outlook\Resiliency\NotificationReminderAddinData
(there are no Local_Machine key created here, my Office is 32-bit not running as Admin/Local_Machine).
So, how can I make a clean installation like I saw before?
I appreciate any help.

I found the solution!
We must clean the references also in:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\1x.0\Outlook\AddInLoadTimes
HKEY_CURRENT_USER\SOFTWARE\Microsoft\VSTO\SolutionMetadata
HKEY_CURRENT_USER\SOFTWARE\Microsoft\VSTO\Security\Inclusion (keys and subkeys)
That's it! :)

Related

VS2017 Installer Project - Cannot Make Uninstaller

I have been able to successfully install a simple program using an Installer Project on Visual Studio Community 2017. However, I can't find out how to create a fully working deployable uninstaller for an end user.
The Installer Project was set up to only create an Application Folder (in C:\Program Files...) with the Program .exe, and nothing else. This it does successfully. I would like an installer because later I plan to make some registry keys upon installation.
To test uninstallation, I have run the original .exe file built by the Installer Project with the "Uninstall" option. This removes the Application Folder but does not remove the program from the Add/remove programs list in Windows - Leading me to believe there are other registry entries that have not been removed.
I have tried to uninstall purely from the Add/remove programs list, but then I get an error:
C:\WINDOWS\system32\msiexec.exe
"Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item."
In Visual Studio, I can click "Uninstall" from the Installer Project right-click menu which does successfully remove both the Application Folder and the Add/Remove Programs Item, but this is not a deployable solution.
Notes:
OS: Windows 10
Using Visual Studio 2017 Community
Looking at the application Folder, there is neither an install nor uninstall .exe file in it. The Installer Project .exe is only in the original build location, and I cannot find how to get a copy in the Application Folder (not sure if a copy there would work).
I have tried configuring the Installer Project as x86 and x64 with no change.
I have tried using both Debug and Release build configurations with no change.
From looking around, WiX seems to have more features and flexibility, but I haven't yet dug into that. Is there an easier solution?
Has this issue occurred to anyone else? My hopes were that Installer Projects were the simple way to learn and handle installation.
Looks like I jumped to conclusions in the comment above, however I think I found the issue: I cannot uninstall the program from the Windows Apps & Features window in System Settings, but uninstalling from Control Panel\Programs\Programs and Features works fine.
When typing in "Remove" using the windows start button, the default item that comes up is "Add or Remove Programs" in System settings (This looks like a Windows 10 thing). When you click that, it forwards you to the "Apps & features window. I am now learning that for some reason this has different functionality than the control panel window. Or maybe it has lower permissions, although I am the admin and only user of this computer...
Because it can be uninstalled from Control Panel, I think this would be the preferred solution. My assumptions about the other window in system settings was my real issue. I just wish the Apps & features window aligned its functionality/permissions with control panel.
I also learned that uninstall is successful when I run msiexec.ex /I{PACKAGEID} in cmd. Not sure how relevant this is, but documenting here.
Installs and uninstalls are transactional, they either work completely or roll back completely. If you do an uninstall but the entry remains in Add/Remove Programs then it's likely that the uninstall did not in fact work.
When you do the install, if it has a UAC elevation dialog then the install is running with elevation and installing files/registry entries to locations prohibited to limited users. Removing files from those locations also requires elevation. You haven't said exactly how your uninstall works, but most likely it requires elevation to succeed, and your program isn't running elevated. If your program uninstalls silently the uninstall will fail silently, so it's possible that your program isn't actually checking that the uninstall worked.
I'd also guess that your Visual Studio session may be running elevated so uninstall from there works fine.
Apart from privileges, an uninstall from a running installed program tends not to work very well because the uninstall process cannot remove your running program or its folder because it's in use. So while you could get it to work (with elevation) you might find that your program and its folder are left behind until the next reboot. If people really want to do this, one of the strategies is to copy an uninstall program to the temp folder and fire it off asynchronously, so everything can be removed.
Uninstalls from Add/Remove Programs&Features generally work fine. Without some context that error message doesn't mean much. It's not a message that comes out of Windows Installer, so it's perhaps coming out of a custom action. Otherwise it may be an issue specific to the test machine.
There is never an uninstall exe in a Windows Installer setup. When you remove a product the system just calls the Windows API to remove the product. Windows Installer is part of the Windows OS with API support for everything that needs doing. Only non-MSI setups require an install and uninstall exe to do anything.
None of these issues seem to be related to your choice of tool. They all create MSI files and if an MSI design is not optimal it doesn't matter what tool you use. There's nothing wrong with WiX, but to install literally a few files it's overkill compared to Visual Studio.

Installing iCloud on XP PC

I'm trying to install iCloud on my Windows XP Pro (SP3) PC. Officially it's supported only for Vista and later, but this hack is widely claimed to work:
Open iCloudSetup.exe file and unzip its files including
Navigate to and open the iCloud.msi with Orca.
In the left table select LaunchCondition. Then change in the right table “VersionNT> = 600” to “VersionNT> = 200” and Save.
Run modified iCloud.msi and install.
Run iCloud Control Panel, located in the Windows Control Panel, and set up as you want.
I tried that promising solution in vain. It seemed to successfully install iCloud, but whenever I try to run it I get
this obscure error
After much fruitless searching I've not found out how to proceed from there and would appreciate advice please.
That trick worked with only the firs versions of iCloud Panel, the v1.0.
For the v2.1 doing the trick the installer ran ok, but when trying to run the iCloud Panel it showed the error you're refering to.
I had some computers running with that older version without any problem.
Try downloading the v1.0 version here:
http://icloud-control-panel-for-windows.uptodown.com/descargar/22412
If you want to try the trick with the v2.1 you have the installer here:
http://icloud-control-panel-for-windows.uptodown.com/
Remember you need to extract the MSI from the exe to do the trick. After running the exe check the %TEMP% folder to get the MSI file.

HOw do you uninstall Dot42

Two weeks ago I downloaded and installed Dot42AndroidSetup.exe.
There was helpful info on running Android on Hyper-V and hopeful possibilities about using VS and C# to directly target Android x86 and debug.
Since then I've seen strange behavior from an automatic update program "TallApplications.Update.exe"
There were 16 entrees in Control Panel\All Control Panel Items\Notification Area Icons for the same program.
When I checked on the web, I saw that Dot42 is associated with this update service. (http://www.tallapplications.com/)
I was able to uninstall the Tallapplications from control panel, however I had to manually delete many registry entries associated with it.
If anyone knows, please tell me how to remove Dot42 without harming VS2010 or VS2012.
There are registry entrees associated with Dot42 product for both versions of Visual Studio.
I also noticed the multiple entries in the Notification Area Icons which doesn't look good. You say you uninstalled 'TallApplications' - did you mean 'dot42'? What registry entries are left after uninstalling? Did you check the \Common7\IDE\Extensions folder? The dot42 folder should be gone after uninstalling. This is the dot42 integration with Visual Studio.
PS. this is not really a programming question - superuser.com or the dot42.com support area is probably a better entry.

MFC Ribbon app not displaying ribbon - when .exe is copy pasted to a different machine

Well, I am facing a strange problem. I have developed a sample MFC ribbon application on my machine - Windows 7 , with Visual Studio 2008. When I copy paste the .exe onto my laptop and run the app , I don't see the ribbon menu (in fact the app has not menu now) .
I have tried looking up the .dll that load in each case(on my work machine and laptop) using process monitor but I am unable to locate what I might be missing. Any help will be greatly appreciated.
Edit 1 -
Ok, So thanks for your responses. Some progress has been made with this issue
I changed my IDE to VS 2010. The ribbon was coded manually and I figured out if I could add it as a resource maybe the problem would be solved. VS 2008 did not have the option of adding a ribbon as a resource.
I installed the VS 2010 Service Pack Redistributable X86/X64 depending on whether the machine is 32 or 64 bit.
I built a new "ribbontest.exe" app from VS 2010 and deployed it on other machines on which I would test my actual app. The ribbon for "ribbontest.exe" loads without any problems.
When I deploy my app and run it, first the old menubar loads for a sec or two, then the ribbon flashes and disappears.
A little history of the app I am referring to -
Initially my application had the menubar view. I followed this article http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c14929/MFC-Feature-Pack-An-Introduction.htm to accommodate a ribbon.
Any suggestions?
Most likely there's a conflict in the settings 'paths'. In your InitInstance() handler, you've got a statement like this:
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need
// Change the registry key under which our settings are stored
SetRegistryKey(_T("yourappname"));
If you haven't changed that name yet, do it. If you did, open regedit.exe on your target machine and remove the whole key under HKCU\Software\yourappname and then try again.
MFC stores user customizations of Ribbons/Menus/... under that key. But if you changed your app those settings don't necessarily match anymore and you can end up with stuff not showing correctly or not at all.
Make sure you download and install the Visual C++ Redistributable Runtime on your destination machine: http://www.microsoft.com/en-us/download/details.aspx?id=29
Or, something like it. Make sure you have architecture (x86/x64) correct and make sure it matches with the service pack version you compile with.
Joe is right: you need redistributable.
Joe is right: you cannot run 64-bit program on 32-bit machine.
All of the above would be indicated by the system (missing DLL, configuration incorrect, or 64/32 bit discrepancy)
Joe is right: your application must be built for specific set of minimum Windows version and service pack.
In addition to Joe’s post you must run release build not debug build.
If all of those requirements are met and you still have this problem, try linking MFC statically and see if problem persists.

Flex/Flash Builder stand alone has a duplicate "Open Resource" menu

I've seen an issue a few different installations whereby the Open Resoure menu open in Navigate appears twice, which wouldn't be a problem if it didn't disable the CTRL+SHIFT+R shortcut to it.
I've seen it affect both Flex Builder 3 and Flash Builder 4, but it only seems to affect the standalone version when it is installed after the plugin version. Re-installation doesn't seem to help.
NOTE: I'm posting this with the intent of self-answering
I recently spotted the answer posted by Kammerer on a related question, but it doesn't appear will in search results. I'm reproducing the solution here, but please vote up the original answer if this answer helped.
Open %FLEX_BUILDER_HOME%\plugins\com.adobe.flexbuilder.standalone_3.0.214193\plugin.xml
%FLEX_BUILDER_HOME% is the installation directory for Flex/Flash Builder
Requires elevation on Windows Vista/7
The version number may not match the above
Search for com.adobe.flexbuilder.standalone.navigate and comment out (or remove) the entire <actionSet> ... </actionSet> node that contains it
Save the file
Run %FLEX_BUILDER_EXE -clean
%FLEX_BUILDER_EXE% is FlexBuilder.exe or FlashBuilder.exe, depending on your version