Is there a way to inject a custom registry setting during installation of Office plugins? Using Visual Studio 2013 and regular "publish" method that generates an .MSI file
You have 2 options for installing: Click Once and Windows Installer (.msi)
Are you sure Publish is creating an .MSI, because in a previous version of Visual Studio it makes a ClickOnce installer which is totally different from an .MSI.
Start here: http://msdn.microsoft.com/en-us/library/bb386179.aspx
I don't think the ClickOnce option gives you the ability to add your own registry settings. If you go the ClickOnce route then it would probably be easiest to add the registry setting in your addin code, assuming the registry location is something like HKCU that the user would have access to. If you need to write to HKLM hive then that requires admin privileges and you shouldn't try doing that from your addin, it will need to be added in a .MSI that runs with admin rights. You can use the InstallShield LE as mentioned in the article, or you could obtain the just released addin for Visual Studio that brings back the old Setup Project (http://blogs.msdn.com/b/visualstudio/archive/2014/04/17/visual-studio-installer-projects-extension.aspx)
Related
i have created an outlook add in and a setup project for that add in using VS setup. I have changed the properties of the setup project "InstallAllUsers" as true.
It successfully generates the .msi and .exe file.
I run the .exe file or .msi as admin an the add in is registered for a single user only. registry entry is only visible in the HKCU hive not in the HKLM hive.
I am on windows 8.1 , Office 2013.
cheers,
Saurav
I have changed the properties of the setup project "InstallAllUsers" as true.
The InstallAllUsers property doesn't affect the registry hive where the add-in is registered. You need to choose an appropriate windows registry hive manually.
The Deploying an Office Solution by Using Windows Installer article describes all the required steps for creating an MSI installed for Office add-ins (including per-machine).
We have an Outlook addin that we created in Visual Studio 2010 in C#. When publishing, we're given an exe that does not allow for any quiet installation processes - none of the typical command switches work.
How do I generate a silent MSI instead of the default setup exe?
Found the solution I was looking for in an MSDN help article.
Deploying an Office Solution by Using Windows Installer
This is all I wanted to do - create an MSI instead of using the provided exe (which does NOT include an integrated MSI or other packages). This allows for flexible, scalable deployments without user interaction, regardless of user that is logged in to the machine.
The short answer is that it just works if you use only the MSI file. The setup.exe installs the prerequisites and then launches the MSI file. There is no good answer I can give about the prerequisites because they may all be different, but in general you just use whatever the details of the redist tell you in docs or a web search, installing prereqs by administrators etc.
It's an MSI, you publish it to the machine (I think that's the group policy description) and in fact the install is required to be silent and will give you an error if you attempt to show UI, the message being "This advertised application will not be installed because it might be unsafe. Contact your administrator to change the installation user interface option of the package to basic."
In other words when the administrator has defined the install parameters etc the user cannot change them.
i want to make a uninstall option in my C# program?
can u help for this?
and provide some code also
If you deploy your application via a Visual Studio Setup and Deployment Project, an uninstaller will come standard with the installation. It will be available in the Add/Remove Programs of the control panel.
You can create an installation project which will automatically add support for uninstallation. Under Other Project Types you have Setup and Deployment. There is InstallShield LE and Visual Studio Installer. If you choose Setup Project under Visual Studio Installer project, you will have uninstall as part of the built project.
see this video
http://www.youtube.com/watch?v=Z-xFLltALg0
If you want the executable to remove itself. aka self-destruct. Check out this blog http://blog.pedroliska.com/2010/05/20/c-self-destruct-windows-app/
In my Visual Studio installer project, I have a dll set to register with COM. I also want to modify a key that is part of the COM registry (The InprocServer32 key). But if I make an entry into the Registry Settings in Visual Studio, the entry gets overwritten by the COM registration.
I used to use a MSI transform to add a registry key to the end of the registry table, where it would overwrite the COM one. However, this was very error-prone, so I decided to switch to the Registry settings in Visual Studio.
How can I make a Registry entry that will overwrite an entry made by the automatic COM registration (i.e. later in the registry table)?
You can't with visual studio projects. This is one of the many limitations of that tool that has caused Microsoft to kill it in the next release of Visual Studio. They reccomended going to InstallShield Limited Edition instead.
If you are going to stick with VDPROJ then the post build processing ( which could include perm. applying the transform to the MSI or using SQL commands to update the table ) would be the way to go. Another approach would be to factor the component out into a WiX merge module that is consumed by VDPROJ. This would give you better control over the component authoring.
Redemption of Visual Studio Deployment Projects
I've created setups for all my Delphi tools with Inno Setup for years. Now some users rather want an MSI installation package, so they can deploy the setups from a central server to all workstations.
How do I create one? Do I have to buy Visual Studio or some other product?
You can use Wix (which is free) to create an MSI installation package.
WiX Tutorial - Creating an Installer MSI with Wix
If you don't understand Windows Installer then I highly recommend The Definitive Guide to Windows Installer. You can't really use WiX without understanding MSI. Also worth downloading is the Windows Installer 4.5 SDK.
If you don't want to learn the Windows Installer fundamentals, then you'll need some wizard type package to hide all the nitty gritty details and hold your hand. There are plenty of options, some more expensive than others.
InstallShield
Advanced Installer
MSI Factory
etc..
However still I'd suggest picking up the above book and taking some time to understand what's going on "under the hood", it'll really help you figure out what's going wrong when customers start complaining that something is broken with the setup :)
You can use Visual Studio - that's paid.
You can use https://www.advancedinstaller.com/ - that has a free edition.
You can use http://nsis.sourceforge.net/Main_Page - for example Winamp uses this installer - and is very configurable and is Open Source.
Google "Freeware MSI installer".
e.g. https://www.advancedinstaller.com/
Several options here:
http://rbytes.net/software/development_c/install-and-setup_s/
Though being Windows, most are "shareware" rather than truly free and open source.
In Visual Studio (including the free community editions) you can install the Microsoft Visual Studio Installer Projects extension [1] which allows you to create an MSI installation package. To install it from within Visual Studio:
Go to Extensions -> Manage Extensions in the menu bar
Search for Installer Projects in the search box
Select Microsoft Visual Studio Installer Projects and hit Download
Restart Visual Studio
Once the extension is installed, you'll create a new project that will contain all of the files and settings for the MSI. To do this:
Go to File -> New -> Project in the menu bar
Change the drop down menus visible to show All languages, All platforms, and All project types respectively
Scroll down in the project type list and towards the bottom select Setup Wizard: Create a Windows Installer project with the aid of a wizard.
Hit Next.
Work through the prompts to choose the installer project name and location. Choose Create a setup for a Windows application at Step 2 and in Step 3 choose the executable and other files that should be included in the MSI (hit Add..). At the end, hit Create.
To build the actual MSI go to Build -> Build Solution in the top menu, and you should see a message like the following in the Output window:
Build started...
------ Starting pre-build validation for project 'Setup1' ------
------ Pre-build validation for project 'Setup1' completed ------
------ Build started: Project: Setup1, Configuration: Debug ------
Building file 'C:\Users\zelda\Source\Repos\Setup1\Setup1\Debug\Setup1.msi'...
Packaging file 'test.exe'...
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
What's created by default is a very basic MSI, but for additional configuration like creating custom actions, adding/changing registry keys, configuring the user interface associated with the MSI, etc., see the full documentation [2]
[1] https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2017InstallerProjects
[2] https://aka.ms/vdproj-docs
You can use "Visual studio installer project" and its free...
This is very easy to create installer and has GUI.(Most of the freeware MSI creation tool does not have a GUI part)
You will find many tutorials to create an installer easily on the internet
To install. just search Visual Studio Installer Project in your Visual Studio
Visual Studio-> Tools-> Extensions&updates ->search Visual Studio Installer Project. Download it and enjoy...
Look for Windows Installer XML (WiX)
You can purchase InstallShield, the market leader for creating installation packages. It offers many features beyond what you get with freeware solutions.
Warning: InstallShield is insanely expensive!
In my opinion you should use Wix#, which nicely hides most of the complexity of building an MSI installation pacakge.
It allows you to perform all possible kinds of customization using a more easier language compared to WiX.