|
-
Jan 6th, 2010, 01:19 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] Installing C++ 2008 runtime files with Inno
Hi, one of the files included in my installation package is the OpenSSL commandline tool, but it requires the C++ 2008 runtime files and those are not always installed.
I'd like to add them to my installation package, but I have no idea how to do that. The other problem is that there are two versions of the C++ 2008 runtime files (x86 and x64) and obviously the correct one needs to be installed based on the OS.
x86: http://www.microsoft.com/downloads/d...displaylang=en
x64: http://www.microsoft.com/downloads/d...displaylang=en
Does anybody know what Inno Setup script to use in order to install those runtime files?
::Edit::
Apparently OpenSSL 32Bit also works on a 64Bit OS, so I just need to know how to install the C++ Runtime files for 32Bit.
Last edited by Chris001; Jan 6th, 2010 at 01:28 PM.
-
Jan 6th, 2010, 02:43 PM
#2
Thread Starter
Frenzied Member
Re: Installing C++ 2008 runtime files with Inno
At first I didn't find a solution, because I was looking for a way to install the runtime files myself, so I could do a silent installation, but it can easily be done with the two lines of code below.
Code:
[Files]
Source: "vcredist_x86.exe"; DestDir: "{tmp}"
[Run]
Filename: {tmp}\vcredist_x86.exe; Parameters: /q
The problem now is that it takes much, much longer to install the C++ runtime files.
If I install the runtime files manually by double-clicking on vcredist_x86.exe, it takes less than 5 seconds to install the files. With vcredist_x86.exe added to the Inno Setup installer, the screen below shows for about 40 seconds, even if the C++ runtime files are already installed.
Is there a solution for this?
-
May 16th, 2010, 02:55 AM
#3
Addicted Member
Re: Installing C++ 2008 runtime files with Inno
Hi Chris,
did you solve this problem?
-
May 18th, 2010, 01:35 PM
#4
Thread Starter
Frenzied Member
Re: Installing C++ 2008 runtime files with Inno
No, I haven't solved this problem. I just put a message on my website that the installation might take a while.
-
May 19th, 2010, 09:20 AM
#5
Re: Installing C++ 2008 runtime files with Inno
You can also ask it on the newsgroup of innosetup:
http://news.jrsoftware.org/read/
To bad they don't have a normal forum for Inno.
-
May 19th, 2010, 09:32 AM
#6
Thread Starter
Frenzied Member
Re: Installing C++ 2008 runtime files with Inno
-
May 27th, 2010, 03:23 PM
#7
Addicted Member
Re: Installing C++ 2008 runtime files with Inno
Hi Chris,
try this:
Code:
Filename: {src}\Redistributables\vcredist_x86.exe; Parameters: "/q:a /c:""VCREDI~3.EXE /q:a /c:""""msiexec /i vcredist.msi /qn"""" """;
It works much faster for me.
Alex.
-
May 27th, 2010, 04:25 PM
#8
Thread Starter
Frenzied Member
Re: Installing C++ 2008 runtime files with Inno
Thank you, alex30. That works much faster indeed
-
Nov 13th, 2015, 10:09 AM
#9
New Member
Re: [RESOLVED] Installing C++ 2008 runtime files with Inno
[CODE]#define VCmsg "Installing Microsoft Visual C++ Redistributable...."
[Run]
Filename: "vc_redist.x86.exe"; StatusMsg: "{#VCmsg}"; Check: not IsWin64 and not VCinstalled
Filename: "vc_redist.x64.exe"; StatusMsg: "{#VCmsg}"; Check: IsWin64 and not VCinstalled
Code:
function VCinstalled: Boolean;
// By Michael Weiner <mailto:[email protected]>
// Function for Inno Setup Compiler
// 13 November 2015
// Returns True if Microsoft Visual C++ Redistributable is installed, otherwise False.
// The programmer may set the year of redistributable to find; see below.
var
names: TArrayOfString;
i: Integer;
dName, key, year: String;
begin
// Year of redistributable to find; leave null to find installation for any year.
year := '';
Result := False;
key := 'Software\Microsoft\Windows\CurrentVersion\Uninstall';
// Get an array of all of the uninstall subkey names.
if RegGetSubkeyNames(HKEY_LOCAL_MACHINE, key, names) then
// Uninstall subkey names were found.
begin
i := 0
while ((i < GetArrayLength(names)) and (Result = False)) do
// The loop will end as soon as one instance of a Visual C++ redistributable is found.
begin
// For each uninstall subkey, look for a DisplayName value.
// If not found, then the subkey name will be used instead.
if not RegQueryStringValue(HKEY_LOCAL_MACHINE, key + '\' + names[i], 'DisplayName', dName) then
dName := names[i];
// See if the value contains both of the strings below.
Result := (Pos(Trim('Visual C++ ' + year),dName) * Pos('Redistributable',dName) <> 0)
i := i + 1;
end;
end;
end;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|