Can i include the "vcredist_x86.exe" in my setup - visual-c++

I have an application developed using c++\cli on vs2008. As you are aware to deploy this application on any machine, i need the vc++ redistributable to be installed on the target machine.
I wanted to know if i could include the vcredist_x86.exe in my setup (created using InstallShield) and install it as a pre-build event?

If you want to know if it is allowed: Yes. This is why it is called redistributable.
This MSDN page describes exactly what you want to do.

Related

VS Express 2012 Installer Options

I've built a project using VS Express 2012, and obviously there are no installer project templates available for me to use to create a setup/installer routine.
I've looked up some alternatives and have found NSIS and WiX, but I'm not too sure about the details of these.
My project uses an MS Access back-end, along with Crystal Reports files, .ini files, and infragistics controls...
Which of these, if it's even possible, will make it possible to create an installer that means the end user doesn't need to have the infragistics package etc installed? Are there any better alternatives?
If you use the Infragistics binaries then there is no way to run your project if the running machine has not the infragistics binaries available.
You need to distrubute them along with the required binaries for Crystal Report.
With Access the problem is different. If you use OleDb.Jet.4.0 (Access 2003 32 bit) then support is included directly in the framework. If you use ACE.12.0 then you need to install the required binaries from Microsoft (https://www.microsoft.com/en-us/download/details.aspx?id=13255) and be sure to read The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine while data export to MS ACCESS

How to embed Visual C++ runtime required from third party dlls

I have a software that is coded in C#. It depends on two(!) third party dll which require Visual C++ 2008 and Visual C++ 2005 redistribute. Originally the installer was built in InnoSetup with all "vs200x_sp1_vcredist_x??.exe" embedded and run on install time. However since it lacks of some advanced features we decided to migrate to Wix Toolset.
The problem is, MSI was running in a more restricted environment, so I didn't figure out what is the best way to require those redistributable file being executed properly. I was tried to use merge modules instead but it didn't work - I can see that the files were installed but dependency walker shows that dll is still not link to the right version.
I think that WinSxS makes things worse at least in this case, since the software keep failing with some error message regarding "Windows Side by Side configiration (14001)" when I use the merge module approach.
So the question is:
Are there any way to build a MSI that runs a exe that install some prerequisites? I wouldn't mind those prerequisites being downloaded or just embedded.
I know that WinSxS information is stored in the manifest of the dll. So if I was permitted to remove the manifest information by the third party company, and use dynamic dll loading instead the problem could be resolved. However is this legitimate? Since I will then need to embedded the Microsoft dlls directally in the msi.
I have noticed one of the dll's manifest says its required version is "9.0.21022.8" but the one in my MSM file is "9.0.30729.6161". Is this the issue? If so can I resolve the issue by I modifying the manifest to allow the right version? I don't think this will cause the dll not working, anyway.
The msi file should install only your software. If you need to install pre-requisites, you should use a bootstrapper for it. Bootstrapper's responsibility is to install pre-requisites and it's not a task of your msi.
If you see that wix bootstrapper is complex you can try on a simple bootstrapper like the dotnet installer bootstraper. you can download it from
http://dblock.github.io/dotnetinstaller/

How to make installer using installshield

I developed windows service in visual c++ using VS2012. Usually I install it using sc create .... command for testing purpose. Now i want to create installer for my service using install shield limited. How can I do that? can anyone show me the steps to do that.
Thanks,
Khurram.
I guess your best bet is try to look up some InstallShield IDE tutorials as the installation package is created in a standalone IDE, but from my experience with InstallShield, Nullsoft and others I would recommend you take a look at WIX (http://wixtoolset.org/), it integrates with Visual Studio, creates a fully functioning MSI package and it is easy to do things like installing a service - take a look at an example here: How to install and start a Windows Service using WiX.

windows application having no dependency to install

I want to implement windows desktop form application having no dependencies to install (e.g. framework, third-party etc).
In which technology I can achieve this?
Can i achieve this goal in C# Win-forms?
You can build an MFC app that requires no installation (just copying the files to the target computer) by statically linking and/or deploying the Visual C++ runtime redist side-by-side.
As Arnon has answered, you can build a .Net app that requires no installation if you target a version of .Net that is pre-installed on your target operating system. This blog entry lists the .Net versions included with each version of Windows.
what version of windows are you targeting your application to ? different versions of windows have different versions of .NET (see this link for details).
So basically, if you are looking for no installation you'd have to shoot for the lowest common denominator and/or ship multiple versions of your app.
I understand that it isn't what you want but -If you do go with .NET it is usually better to ensure that the installer will install the right version of .NET if needed (see this link for example)

How to properly install MS VC++ 9 runtime?

I have an application that uses the ms vc++ runtime. How should I install it on the end-user's system if it is not present? I was thinking of bundling it with the installer... but how would I do that as far as what to include? Is there some silent installer? If so, where can it be found? I can't seem to find it in the Windows SDK.
There is an interesting post about deploying the runtime libraries on the Visual C++ blog. The post is about VC8 so I'm not sure all the recommendations apply to VC9.
Here are your options according to Microsoft:
Use an .msi installer including the .MSM files for the VC
libraries you're using. These MSM
files install the libraries globally.
They also keep a reference count so
that the libraries are removed when
the last application using them gets
uninstalled.
Use "app-local"
deployment i.e. copy the
libraries and manifest files in your
application directory. This is a simpler
solution if you don't use an .msi
installer. Your app should still use the
system version of the libraries if they are more
up-to-date than your own.
Link everything statically (and avoid crt usage across dll boundaries)
Another option Microsoft discourage you from using is running the Visual C++ redist installer from your own installer.
I'm not sure what their reasons are. It will take a few extra megabytes and will not be reference counted but it still works very well AFAICT. You can pass the /q option to vc_redist_x86.exe to perform an unattended install (no user interaction).
It has it's own installation program. I've seen it usually run as a prereq step of a larger installer.
One way or the other, you need to list it in your manifest. So you might just as well deliver it as via SxS in your application rather than try to deliver a global copy to the target machine. SxS is a big hard subject, sadly. Hopefully someone will supply an answer with more details and I'll delete this one.

Resources