windows installer for COM component - com

I have a C++ activex control that I need to make an installer for. It needs to drop the dll and make some registry keys.
I have about 6 .RGS files which I made for self-registration via regsvr32, which work.
To do an installer I am manually porting the RGS scripts into the visual studio 2008 windows installer registry GUI. I feel like its not possible to do an exact port (e.g. RGS keywords like ForceRemove).
Isn't there a way to generate these files from the IDL file? Am I doing this wrong?

SelfReg is not a best practice in an MSI install because it's out of process and fragile. Visual Studio 2008 Installers are limited but you should be able to set the Register property to vsdrfCOM instead of vsdrfCOMSelfReg. This will cause the COM meta data to be harvested from your DLL and authored natively in MSI.
After you build your MSI, you should notice the SelfReg table is empty and a serious of automatically authored rows in the Registry table for you COM data.
Note: VDPROJ is kind of flakey at extracting this COM so it may not work. You might have to consider a stronger tool such as InstallShield or Windows Installer XML.

You are doing it wrong. The .rgs files are there so that the component can install itself. Any installer supports letting a component install itself. A Visual Studio Setup project for example, set the Register property.

Related

installshield - how to let user add files to program files folder in the install

I am trying to create an installer that will get the project to install from my server. The project will be chosen dynamically by the user (the user has access to the server), so I can't copy the files to the installer when I create it.
I want that the files will add to to ProgramFilesFolder in the installer.
How can I do this?
Not entirely sure what you want to do. Do you want to automatically add files to a project that they select and then build and MSI? Installshield can be run via automation (i.e via VBScript, VB, C# etc...), and you can achieve what you want using this approach. To work with a project you start from the ISWiProject Object. See this answer: Installshield Build Automation. And for C#: Getting Started with InstallShield Automation and C#.
Personally I would use Wix instead and automate via the Heat.exe tool and standard XML editing via code.
See how Installshield compares to other setup tools: What installation product to use? InstallShield, WiX, Wise, Advanced Installer, etc
Learn about Wix:
Windows Installer and the creation of WiX
MSI vs nuget packages: which are is better for continuous delivery?
Newer answer on automation

Is it possible to have Windows Installer register a 64-bit shell extension which is wrapped in a 32-bit Component?

I have an InstallShield Basic MSI project which builds both 32-bit and 64-bit installers using Release Flags mechanism to build the different packages with the correct Template Summary, etc. One of my Components is an explorer.exe shell extension, so in order for this to work it needs to be registered in the 64-bit node in the registry when installed on windows 64-bit, NOT in the Wow6432Node. However, because this is a 32-bit Component to Windows Installer it will get registered as such and go down the Wow6432Node. I am told by InstallShield that this is native Windows Installer behavior and there is really no way around this other than Custom Actions (which I have already resorted to).
Do I have to resort to running regasm? This is what I currently do however I would rather not use Custom Actions for something like this. Also, it appears that other products have the same pattern: a 64-bit shell extension, however installed down program files (x86). I see TFS Power Tools and WinZip doing this for example. For these products, I do NOT see regasm.exe running so I assume they have some other mechanism for this.
Any ideas?
Did you try to set msidbComponentAttributesDisableRegistryReflection (Component table) attribute for that component?

How to create a registration-free installer with WiX (manifest-based)

I'd like to create an installer package to install registration-free COM components (with manifest files included). This would be more or less a self-extracting archive to place some files in a target directory given as commandline argument, but it would also need to check or install some other redistributables like VC++ or DirectX.
The package is supposed to be used in another applications's installer as some kind of redistributable package itself. It should not be registered in the "Program and Features" dialog of Windows but has to be removed with the application. Ideally there should be no changes to the Windows registry.
So far I haven't been very successful. Can anyone please provide me with some hints regarding this use case?
You've got about a dozen different questions in that one question. Start with just creating a simple MSI that successfully installs your files and your manifest. Create a COM client to test it. You can also put AppSearch and LaunchConditions in your MSI to detect your dependencies and not allow installation if they are missing.
That's about all you should have to do for this simple question. As for the other questions.... if you are a redistributable and someone else is silently installing you then it's their job to handle the installation of the other redistributables. Also if they don't want you listed in Programs and Features they can pass the ARPSYSTEMCOMPONENT=1 to your installer and you won't be listed. If they want to uninstall you when they uninstall themselves, that's their problem not yours.
If you are really creating a redistributable to be used by other products, sometimes a merge module is the appropriate solution. They build their MSI files and include your merge module.
Otherwise, reg-free COM is in theory an easy install because you're just installing manifest files and Dlls etc. However I don't understand how that could be used by other apps because (IIRC) a client app exe needs your manifest and Dll in their install folder, so how can they do that when they are not installed yet? Or even if they are installed how can you find them? So that goes back to the merge module idea so they include your merge module and install an exe, your manifest and your Dll in the same location. When they uninstall so do your files.

Include dll's in WiX msi base Installer

I am currently making an Outlook addin in Visual Studio 2012,
i create an Installer for my project, but in order for my addin to work on my clients computers i also need to add the SharePoint Foundation (http://www.microsoft.com/en-us/download/details.aspx?id=21786) dll’s,
but when I try to add them from my C:\Windows\assembly folder to the WiX msi base installer Project\References - (by right clicking and pressing add Reference), I get the following error “A reference to [filepath] could not be added. Please make sure that the file is accessible, and that it is a valid WiX reference.“
Do you know what I can do ?
thanks a lot for your help!
You need to add the files to Product.wxs - see http://wix.sourceforge.net/manual-wix3/wix_learning.htm . You only add .wixlib and other projects via references.
Another approach would be to use a WiX 3.7 Bootstrapper project. The bootstrapper engine is often called "Burn" so you might see that in discussions.
A bootstrapper project allows you to install dependencies using their own installers, such as the "SharePoint Foundation 2010 Client Object Model Redistributable" you linked to. A nice example of a bootstrapper is the WiX 3.7 installer itself but most projects can be much simpler.
Installing dependencies using vendor provided installers has the advantage of avoiding having to re-implement any necessary logic yourself and allows them to managed and upgraded by the user.

MSI Installer error-dialog localization (WiX)

I have created an MSI installer for a .NET 3.5 application written in Visual Studio Express 2008. The installer UI is localized (to danish) and looks fine. My problem is that errors, say a previous version is installed and needs to be removed first, the error dialog is in english. How do I localize error-dialogs too?
I'm not familiar with Visual Studio, but have you checked out http://www.tramontana.co.hu/wix/lesson2.php#2.3 - you need to ensure you specify the correct language and codepages in the Product and Package tags. You might need to edit the source wxs file if VS doesn't provide a GUI for this.