How to install vc++ redistributable without windows installer - visual-c++

In our product we had to disable the "windows installer" service (security-wise).
In Windows 2012 it is not possible to do so with sc.exe, so we had to change the value of the service in the registry
(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\msiserver ---> start = 4)
Now, as an upgrade process of our product, we need to install
"VC++ 2013 redist"
Is it possible to install this package without using windows installer?
Or, is it possible to start a "disabled" windows installer service without restarting the machine?

Instead of installing the VC++2013 runtime using Windows Installer you can put the needed files in the directory of your executable:
you can directly install redistributable Visual C++ DLLs in the application local folder, which is the folder that contains the executable application file.
(from Redistributing Visual C++ Files)

Related

Unable to install VSIX in VS 2012 & Windows 10

I am trying to install RXX(VSIX Isntaller) in windows 10 & VS 2012. But it gives error as below
The extension 'Razor(cshtml) pre-processor requires a version of the .NET framework that is not installed.
It is working properly in Win 7 ( .NET Framework 4.5 ). When I tried to install .NET framework 4.5 in Win 10, its no allowing to do the same.
Can anyone suggest anything for this?
Thanks
I expect the VSIX manifest to reference a specific .NET framework version and doesn't specify a range. Since .NET 4.6 replaces 4.5 it may cause these type of issues.
Extract the VSIX using your favorite extraction tool (it's a zip file), edit the manifest file by removing or updating the dependencies specified and zip it back up.
The only way to install the extension was executing the VSIXInstaller.exe as administrator and passing the VSIX file as parameters. To do that, follow this procedure:
Open a CMD window as Administrator
Go to Common, IDE folder of the VS 2015 installation. In my case:
CD C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
Execute the installer passing the VSIX file as parameter. In my case:
VSIXInstaller.exe c:\AppBuilder.vsix
Finally, the installer will start the installation!
I hope it helps you
Source

while installing vc_redist.x64.exe, getting error "Failed to configure per-machine MSU package."

While I am trying to install vc_redist.x64.exe on Windows 8.1
getting following error:
Failed to configure per-machine MSU package.
Posting answer to my own question as I found it here and was hidden in bottom somewhere -
https://social.msdn.microsoft.com/Forums/vstudio/en-US/64baed8c-b00c-40d5-b19a-99b26a11516e/visual-c-redistributable-for-visual-studio-2015-rc-fails-on-windows-server-2012?forum=vssetup
This is because the OS failed to install the required update Windows8.1-KB2999226-x64.msu.
However, you can install it by extracting that update to a folder (e.g. XXXX), and execute following cmdlet. You can find the Windows8.1-KB2999226-x64.msu at below.
C:\ProgramData\Package Cache\469A82B09E217DDCF849181A586DF1C97C0C5C85\packages\Patch\amd64\Windows8.1-KB2999226-x64.msu
copy this file to a folder you like, and
Create a folder XXXX in that and execute following commands from Admin command propmt
wusa.exe Windows8.1-KB2999226-x64.msu /extract:XXXX
DISM.exe /Online /Add-Package /PackagePath:XXXX\Windows8.1-KB2999226-x64.cab
vc_redist.x64.exe /repair
(last command need not be run. Just execute vc_redist.x64.exe once again)
this worked for me.
I would like to give you a background on Universal CRT this would help you in understanding as to why the system should be updated before installing vc_redist.x64.exe.
A large portion of the C-runtime moved into the OS in Windows 10 (ucrtbase.dll) and is serviced just like any other OS DLL (e.g. kernel32.dll). It is no longer serviced by Visual Studio directly. MSU packages are the file type for Windows Updates.
In order to get the Windows 10 Universal CRT to earlier OSes, Windows Update packages were created to bring this OS component downlevel. KB2999226 brings the Windows 10 RTM Universal CRT to downlevel platforms (Windows Vista through Windows 8.1). KB3118401 brings Windows 10 November Update to the Universal CRT to downlevel platforms.
Windows XP (latest SP) is an exception here. Windows Servicing does not provide downlevel packages for that OS, so Visual Studio (Visual C++) provides a mechanism to install the UCRT into System32 via the VCRedist and MSMs.
The Windows Universal Runtime is included in the VC Redist exe package as it has dependency on the Windows Universal Runtime (KB2999226).
Windows 10 is the only OS that ships the UCRT in-box. All prior OSes obtain the UCRT via Windows Update only. This applies to all Vista->8.1 and associated Server SKUs.
For Windows 7, 8, and 8.1 the Windows Universal Runtime must be installed via KB2999226. However it has a prerequisite update KB2919355 which contains updates that facilitate installing the KB2999226 package.
Why does KB2999226 not always install when the runtime is installed from the redistributable? What could prevent KB2999226 from installing as part of the runtime?
The UCRT MSU included in the VCRedist is installed by making a call into the Windows Update service and the KB can fail to install based upon Windows Update service activity/state:
If the machine has not updated to the required servicing baseline, the UCRT MSU will be viewed as being “Not Applicable”.
Ensure KB2919355 is installed. Also, there were known issues with KB2919355 so before this the following hotfix should be installed.
KB2939087
KB2975061
If the Windows Update service is installing other updates when the VCRedist installs, you can either see long delays or errors indicating the machine is busy.
This one can be resolved by waiting and trying again later (which may be why installing via Windows Update UI at a later time succeeds).
If the Windows Update service is in a non-ready state, you can see errors reflecting that.
We recently investigated a failure with an error code indicating the WUSA service was shutting down.
To identify if the prerequisite KB2919355 is installed there are 2 options:
Registry key:
64bit hive
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Package_for_KB2919355~31bf3856ad364e35~amd64~~6.3.1.14
CurrentState = 112
32bit hive
HKLM\SOFTWARE\[WOW6432Node\]Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Package_for_KB2919355~31bf3856ad364e35~x86~~6.3.1.14
CurrentState = 112
Or check the file version of:
C:\Windows\SysWOW64\wuaueng.dll
C:\Windows\System32\wuaueng.dll
is 7.9.9600.17031 or later
I faced a similar problem but in my case I was trying to install Visual C++ Redistributable for Visual Studio 2015 Update 1 on Windows Server 2012 R2. However the root cause should be the same.
In short, you need to install the prerequisites of KB2999226.
In more details, the installation log I got stated that the installation for Windows Update KB2999226 failed. According to the Microsoft website here:
Prerequisites To install this update, you must have April 2014 update
rollup for Windows RT 8.1, Windows 8.1, and Windows Server 2012 R2
(2919355) installed in Windows 8.1 or Windows Server 2012 R2. Or,
install Service Pack 1 for Windows 7 or Windows Server 2008 R2.
Or, install Service Pack 2 for Windows Vista and for Windows Server
2008.
After I have installed April 2014 on my Windows Server 2012 R2, I am able to install the Visual C++ Redistributable correctly.
The OS failed to install the required update Windows8.1-KB2999226-x64.msu.
However I tried to find the particular update from -
C:\ProgramData\Package Cache\469A82B09E217DDCF849181A586DF1C97C0C5C85\packages\Patch\amd64\Windows8.1-KB2999226-x64.msu.
I couldn't find it there so I installed the kb2999226 update from here (Windows 10 Universal C runtime)
Then I installed the update according to my OS and after that It was working fine.
In my case and while installing VS 2015 on Windows7 64x SP1, I experienced the same so tried to cancel and download/install the KBKB2999226 separately and for some reason the standalone update installer also get stuck searching for updates.
Here what I did:
When the VS installer stuck at the KB2999226 update I clicked cancel.
Installer took me back to confirm cancellation, waited for a while then opened the windows task manager and ended the process of wuse.exe (windows standalone update installer)
On the VS installer clicked "No" to return to installation process. The process was completed without errors.
I also got that error when trying to install the Visual C++ 2015 Redistributable on my Windows 7 SP1 machine.
I solved my problem by installing the Visual C++ 2015-2019 Redistributable from here https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0

InstallShield LE doesn't install MS Visual C++ 2010 Redistributable Package (x86)

I'm using InstallShield Limited Edition to create installer (setup.exe) for my project. My project requires Microsoft Visual C++ 2010 Redistributable Package (x86), and I want include this redist into my setup.exe. I do it in Redistributables view in my InstallShield project - just selecting Microsoft Visual C++ 2010 Redistributable Package (x86) as InstallShield Prerequisite component and setting 'Extract From Setup.exe' property for it.
I decided to test my setup.exe on XP box and Win7 box. For this purpose I deleted Microsoft Visual C++ 2010 Redistributable from these boxes (via Control Panel->Uninstall program) and tried to install my app. My expected result is - c++ redist will be installed before my project installation.
But I have different results: I have no problem when installing it on XP box: it installed c++ redist first and my app then. Works as it should be!
But when I launched setup.exe on Win7 box it didn't install c++ redist - it only installed my app. Can anyone explain this?
Btw, Microsoft Visual C++ 2010 Redistributable Package (x86) had size ~11 mb and version 10.0.40219 on my Win7 box before I uninstalled it. Now I downloaded it from here http://www.microsoft.com/en-us/download/details.aspx?id=5555, installed manually and... I see that now it has version 10.0.30319 and size only ~918 kb. So, I wonder again, what's going on?
This may be related to the operatingsystemconditions configuration in the Installshield pre-requisite file Microsoft Visual C++ 2010 Redistributable Package (x86).prq located in the Installshield SetupPrerequisites directory.
The operatingsystemconditions section specifies which versions of Windows, including service packs, 32/64 bits, the redistributable file should be installed on.
See http://daniellang.net/installshield-and-microsoft-visual-c-2010-redistributables/ for some more details.
You've installed the SP1 redist, but there is an updated version with a MFC security update.
http://support.microsoft.com/kb/2565063

Packaging Visual Studio 2012 Redistributable into an InstalLShield setup

I have developed a software with visual studio 2012 using the c++ language. I use Installshield 2010 Premier to build my setup project. I am trying to package the visual studio 2012 redistributable into the setup package so that it installs automatically. Is there a way to do this? I cannot find the redistributable in question on the redistributable page while configuring the installer.
Can I add it manually?
Any help would be appreciated.
P.S. Currently, I'm just manually running the redistributable I downloaded from Microsoft page before I run the setup.
Update to read first:
You need to install IS2012 SP1 to get these prereqs. See:
InstallShield 2012 Spring Service Pack 1 is Now Available!
Otherwise the PRQ XML can be found at:
x86 PRQ XML On Saturn
x64 PRQ XML On Saturn
Additional background information:
InstallShield comes with a prerequisite editor that you can use to define your own PRQ files. For a tutorial see:
Using InstallShield 12 to Install .NET Framework 3.0
Note: The PRQ schema hasn't changed in a long time. You can frequently install a trial version of InstallShield on a VM, find a new/updated PRQ and then back port it to your 2010 environment. Add it, build and test and it usually works fine. Also sometimes InstallShield will have expansion packs and addon installers to add these without rereleasing the product.
Use the redistributable merge modules (*.msm files) to integrate them into your setup. If you have Visual Studio installed you can find them at Program Files (x86)\Common Files\Merge Modules .

Installing PlatformToolset v110 without installing Visual Studio 2012

We have a Visual Studio solution that contains some VC++ projects, and we've currently upgraded to Visual Studio 2012 from VS2010. In the process we also lifted the VC++ projects to PlatformToolset v110.
On our build server (Jenkins), we would like to build this project with MsBuild without having to install VS2012. But I can't get it to work, and I think it's because the folder C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110 must be present.
This folder and its contents is created during installation of VS2012, but as far as I can tell it won't be included in either the Windows SDK 7.1 or Windows SDK 8.0?
Is there any other SDK or installation package that can help with this issue?
I know it's not really without installing Visual Studio 2012, but:
If licensing costs are the biggest driver perhaps the Express for Windows Desktop edition could be an alternative. You could keep the installation to the minimum required to support C++ builds.

Resources