We have developed a Outlook Add In. I wish to deploy this add in in both Single User / Multi user environment
I have managed to deploy this Add In for single user environment. I am adding a Registry Entry (HKCU) for single user and the add in gets installed under "APPDATA\ROAMING\CompanyName\AddInName." I am using standard MSI for installation
But the issue I face is even if i ran the Installer, I don't see Add In appearing under Outlook, unless, I browse to the installation path (as above) and double click on VSTO file and deploy it again.
For Terminal Server / Citrix based implementation, I am trying to change the Registry to HKLM but not 100% sure how this will work.
My question is that
1. How I can have deploy this Outlook Add in only in one attempt. I don't want to install and then deploy (double click VSTO) file?
2. How I can deploy this add in for Terminal Server / Citrix based implementation?
I have gone through various blogs but they are not very clear and cause more confusion.
Would appreciate your expert suggestions
Thanks
Unfortunately I can only answer the first part of your question - You will have to create registry entries so that when Outlook is started it automatically applies your installed add in. See the link below for a detailed explanation of the registry keys that are required. https://msdn.microsoft.com/en-us/library/bb386106.aspx
In short, You need to add a registry entry for your add in that contains a FriendlyName, Description, LoadBehavior and Manifest input. Directing to the following link will tell you exactly how to do this and exactly where to put the keys. https://msdn.microsoft.com/en-us/library/cc442767.aspx#To-create-registry-keys
Best of luck and If you have any issues with that, comment below and I will help you as soon as I can.
**As an added note, I once had problems similar to the one you are having, and in my case it was due to the LoadBehavior setting. I was using the "UK Spelling" of the word instead of the US spelling. LoadBehavior must be specified exactly as I have written it here.
Related
So I have a Windows Forms app that uses an encrypted connection string for the database.
Every quarter we change the database password, but the vendor only upgrades this app maybe every 12 or 18 months. So because of this, the "appname.exe.config.deploy" file that is hosted on the clickonce webserver would have our new password--but the hundreds of desktops would still have the old .config file with the old password because the verision has not changed.
I know I can delete the %userprofile%\AppData\Local\Apps\2.0\ folder (deleting potential unrelated click-once apps in the process), but we are talking hundreds of desktops and that's not really feasible here.
I would like to know if/how I can tweak the .manifest or whatever in order to "fake" the clickonce to think it needs to re-install. I can't imagine I'm the first one with this issue but I've found nothing satisfactory in my searches so far.
Thank you.
Unfortunately install\reinstall process initiating when no application installed or version has changed.
I don't understanding, why so important having old one ClickOnce version, because your clients will make update process anyway.
If new copy installation is fine for your clients, then you can set new "Application instance name". Your customers launch will do new instance installation of your application. I'm really don't know how to change this name from Visual Studio or Mage.exe, but you can download my utility from second download link here. [Choose] your application folder -> [Update] action -> Add any prefix for [Application instance name] field value (for example "_1") -> [Build] + [OK].
Anyway, version increment is the best solution for you.
I want to know how can I know whether Outlook is configured or not using c# in winforms?
I found something on this
http://www.outlookbanter.com/add-ins-outlook/94961-out-check-whether-outlook-configured.html
but don't think it's relevant.
The above link shows approach using registry.
I want to know is there any other way except inspecting registry?
Check following link
How to detect whether Outlook is configured on machine using Regis
As described here, you can perform following check from registry entry
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
Messaging Subsystem\Profiles
If you find any folder inside this 'Profiles' folder, then the Outlook is
configured for the current user.
I know that it is possible to pass in parameters via URL to ClickOnce apps launched online. However, most users downloads setup.exe and launch it from their machine. Is there any way that I can re-write setup.exe at download, insert a code (let's say the user's email address), and then have the app launch with knowledge of the code? Assume that we can somehow re-sign setup.exe so that it is legit.
Assume .NET 3.5.
Update The goal here is to pass on either email address and/or referrer information to setup.exe so that even when the user runs the installer from a different machine and a different ip we can figure out who did the referral.
Update 2 Assume .NET 3.5 SP1, does it help? Apparently one can now pass parameters to .application while offline. Is it possible to embed parameters into the setup.exe so that it calls .application?ref=someone right when setup.exe is run?
Well, if your goal is to embed a customer id (email, code, etc) into the exe, the easiest way I can think of is using the IPropertyStorage and IPropertySetStorage interfaces. If you are feeling brave, you could call methods directly on IPropertySetStorage via p/invoke, or you could go the easy route and use Microsoft's prepared COM wrapper, which is called dsofile.dll.
Note that while dsofile is intended for office documents, it does indeed work on any file - including .exe files - you are just stuck with the pre-defined property names. Why not throw your customer id into something like the .Comments property. Just do it in such a way that you can parse it out again.
Here's a sample:
var doc = new OleDocumentPropertiesClass();
doc.Open(pathToFile);
doc.SummaryProperties.Comments = "joe#test.com";
doc.Save();
Of course, you need to first copy it to a temp location, and some time after the user downloads it you'll want to delete it.
You can bundle dsofile.dll with your application and register it as a dependancy and use it in your installer to read the property back out. Or if you can p/invoke the IPropertyStorage without it, then you won't have the dependancy.
The other thing to look into would be using the extended file properties that are read by the Shell32.dll. I just haven't been able to find a clean way to write them easily. If you go this route, please share how you wrote the properties to your .exe.
Have a look whether InPlaceHostingManager class can help you in this case. It won't probably do exactly what you have asked for. But may be able to help...
Any ClickOnce application based on an .exe file can be silently
installed and updated by a custom installer. A custom installer can
implement custom user experience during installation, including custom
dialog boxes for security and maintenance operations. To perform
installation operations, the custom installer uses the
InPlaceHostingManager class.
Walkthrough: Creating a Custom Installer for a ClickOnce Application
EDIT
I am not sure whether you could achieve what you want exactly in the way that you have described in the question. Check whether these threads help you.
Accessing Local and Remote Data in ClickOnce Applications
How to include custom data files in ClickOnce deployment?
How to: Retrieve Query String Information in an Online ClickOnce Application
How would you imagine to "rewrite" setup.exe at download? if instead of opening your application with the provided link (url) users are downloading the file locally directly from the network share, you can't intercept this.
I would try to play with permissions and have the users to execute it from the link provided to them, but unable to connect directly to the share or web address and download it. Not sure this is possible anyway.
You can try embedding that information as a resource into the exe.
Here's a c++ example of updating a resource of an exe. http://msdn.microsoft.com/en-us/library/ms648008(v=vs.85).aspx#_win32_Updating_Resources
You should combine approach by Charith and Josh - essentially, configure your web server so that you can generate a new setup based on URL parameters. Use custom installer to read from the referral information from resource for setup.exe. Check this link for how to manipulate resources for a native application in C# - you have to write to resource file while generating setup and need to read it from your custom installer.
Yet another way of generating custom setup would be to build your executable or helper assemblt from command line embedding the necessary information. And then build the setup from command line tools (see http://msdn.microsoft.com/en-us/library/xc3tc5xx.aspx). It appears to be quite cumbersome and will take long time to generate the custom setup as opposed to modifying the resource of already built setup.
A completely different approach would be to email the unique referral code (registration code) whenever user downloads the application. In the setup (or application), use custom installer to prompt user for this code. If the setup is invoked via URL then the code will be available from there and in such case Custom Installer need not ask for the code. The email that you send when user download the setup should inform user to preseve the code into some text file along with the setup file.
ActiveX Info - This ActiveX Control is
Implemented using C#, VS 2008, .Net Framework 3.5
Digitally Signed with valid Code Signing Certificate
Installed using VS Deployment Project and Registered on Client Side
Problem - One of our web page loads this ActiveX Control, however for a first time visitor, the IE (I'm using IE9) prompts
This webpage wants to run the following add-on: 'Control name is not available' from 'Not Available'
After allowing it, then go into "Tool" => "Manage Add-ons", it's now there with proper Control Name & Publisher.
Seeking - I'm looking for solutions that will either
Display correct information in the warning prompt, Control name & Publisher name, OR
Remove the warning completely
Researched Solutions - I have found some suggested solutions, but none of them describe fully
Display correct name by COM Shim approach on MDSN
Performance issue
Although I did go ahead downloading COM Shin Wizard, but lack of info after creating it
Remove warning by setting up CLSID and domain as an approved domain in the registry during installation
Not sure which registry to create/update, need more specific registry values
How to Set ActiveX Control Name on StackOverflow
Bounty set by me, but maybe the question is too old which grabs no attention.
I'll start bounty on this question once the old one has expired.
All helps are appreciated
Got it solved by putting on to pre-approvaed list
To put your control on the
pre-approved list, you need to write
the CLSID of the control to the
following registry location.
HKEY_LOCAL_MACHINE
SOFTWARE
Microsoft
Windows
CurrentVersion
Ext
PreApproved
I'd like to release some updates for a WinForm program, but to date I have simply released an all-new compile. People have to un-install the old version and install the new version.
EDIT: I'm using an auto-generated InstalWizard. It preserves my file strucutre and places the [PrimaryProgramOutput] in a particular directory. I forget what this is called.
I bet there's a way to get around this, but I don't know what it's called. As you may guess, searches for "updates" "new version" "install" and the other obvious things I've tried have generated an impressive number of irrelevant results. >_<
I suspect this process has a particular name, which should point me in the right direction, but if it doesn't please link to a tutorial or something.
I see from the tags you are using C#. Visual Studio can create Setup projects for these kind of tasks. The setup projects als contain a property RemovePreviousVersion, which will remove a previous version if the versioning of your setup is correct and the GUID of the application stays the same.
See this link for more information:
http://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/
ClickOnce deployment is a great solution most of the time...
You can deploy to the web and when ever your users start the application it will check for updates and automatically update the application if there is a new version available.
It can also be configured not to update automatically but only to notify the user that there is a new version available and allow the user to control the update process.