|
Hello,
your .net framework installation script save my time.
can you help me to install crystal Report Runtime from Web ?
thanks
Kalpesh
|
|
|
|
|
This will install the VC Runtime 2012 Update 4.
[CustomMessages]
vcredist2012_title=Visual C++ 2012 Redistributable
en.vcredist2012_size=6.3 MB
de.vcredist2012_size=6,3 MB
en.vcredist2012_size_x64=6.4 MB
de.vcredist2012_size_x64=6,4 MB
;There isn't an IA64 version :(
;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
en.vcredist2012_lcid=''
de.vcredist2012_lcid='/lcid 1031 '
[Code]
const
vcredist2012_url = 'http:
vcredist2012_url_x64 = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe';
procedure vcredist2012();
var
version: cardinal;
begin
RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\VisualStudio\11.0\VC\Runtimes\' + GetString('x86', 'x64', ''), 'Installed', version);
if (version <> 1) then
AddProduct('vcredist2012' + GetArchitectureString() + '.exe',
CustomMessage('vcredist2012_lcid') + '/passive /norestart',
CustomMessage('vcredist2012_title'),
CustomMessage('vcredist2012_size' + GetArchitectureString()),
GetString(vcredist2012_url, vcredist2012_url_x64, ''),
false, false);
end;
EDIT: Fixed wrong version in registry key.
What do you get when you cross a joke with a rhetorical question?
modified 21-Jun-14 11:21am.
|
|
|
|
|
Message Closed
modified 23-Dec-20 12:37pm.
|
|
|
|
|
If you don't have the ArchitecturesInstallIn64BitMode option set, the install will always be x86, so Is64BitInstallMode will be false , causing all methods that get strings/filenames/etc to return the x86 version.
I have tested this, and it works (I accidentally deleted the script I used to test while cleaning out some files on my HDD, so I can't share it). I am not sure why it didn't work for the person that first reported this, as this isn't really an issue, as InnoSetup takes care of it for us.
What do you get when you cross a joke with a rhetorical question?
|
|
|
|
|
Something about the path for the x86 redistributable:
the constant: vcredist2012_url is pointing to the file vcredist_x84.exe and the correct one is: vcredist_x86.exe
|
|
|
|
|
I'd vote this higher if I could
It is superb and so very well organised.
It was such a pain trying to get .NET installed before I found this, now it's a breeze.
|
|
|
|
|
i like to know Is it free for commercial use ??
tbhattacharjee
|
|
|
|
|
|
How to install prerequisite without showing any dialog box which say (The following applications are required before setup can continue)
I want to make a setup that will search and install without asking.
I need to install .net client profile without asking the user to install.
Can you tell me how to do that
|
|
|
|
|
Does this script install the .NET Client Profile or the .NET 4 Full install?
I can't see where (or why) it chooses and the #define statement seems to encompass both.
Thanks,
Nick
|
|
|
|
|
Hi,
i tried to install the MyProgram setup.
in last step of installation its showing, "Download Dependencies Windows installer and SQL Server r2"
then i click next button. the progress bar running and showing file downloading then its shows successfully installed. but the windows installer and sql server is not installed in my PC.
Can any one help me ?is any where i need to change the code.
Thanks
karthik
|
|
|
|
|
Hello man. Thank you for this script so good!
I have a doubt about the terms
#define use_dotnetfx11
#define use_dotnetfx11lp
.....
In the examples of define term we used, see
#define MyAppName "My Program"
#define MyAppVer GetFileVersion("MyProg.exe")
But the use_dotnetfx11 there is not a value setted...
as:
#define use_dotnetfx11lp = "??????"
And my pascal code I have:
#ifdef use_dotnetfx11
dotnetfx11();
#ifdef use_dotnetfx11lp
dotnetfx11lp();
#endif
dotnetfx11sp1();
#endif
How does it know that use_dotnetfx11 is true or false?
Is the right way?
|
|
|
|
|
I finished my project in vb.net.
What do I need to have in order to run this tool properly (beside my exe and database)?
Do I need all the Dlls & Ocxs?
Do I need to specify which framework I'm using?
Is it possible to get into details of how to use it with an example?
Thank you
Ami
Israel
|
|
|
|
|
Hi... First of all, I want to thank you very much because this post help me a lot. But somehow i still confused about the dependencies file. I need to include microsoft installer 3.1. I delved into the msi31.iss file and find out that if the file is not found, the setup will download the msi31 from the internet.
I've got the msi31 installer from visual studio. The name was "WindowsInstaller-KB893803-v2-x86.exe". And in the msi31.iss file, there was "AddProduct('msi31.exe', " line. should i modify the line or the file name, or perhaps i should not?
Thanks
|
|
|
|
|
Message Closed
modified 23-Dec-20 12:37pm.
|
|
|
|
|
I've done that with vcredist2015.exe and the file isn't included in the installer. Do I need to add it manually to the installer or should it be included automatically?
|
|
|
|
|
Very useful and clear. Thanks a lot!
|
|
|
|
|
Hi
Is there a way to use your scripts to install the .Net Framework on e.g. a Win Server 2008 R2/2012? As you must use the Role Manager, the current scripts don't work for me.
Thank you and thanks for your great project!
|
|
|
|
|
this powershell script does the job (you need to specifiy the Dotnet-Setup Url):
Param($computer = "localhost")
Function Get-OSVersion($computer,[ref]$feature)
{
$os = Get-WmiObject -class Win32_OperatingSystem -computerName $computer
Switch ($os.Version)
{
"6.1.7600"
{
If($os.ProductType -ne 1) #only 2008R2
{
$feature.value = "NET-FRAMEWORK"
} #end if
} #end 7600
"6.2.9200"{
If($os.ProductType -ne 1) #only 2012
{
$feature.value = "NET-FRAMEWORK-Core"
} #end if
}
DEFAULT { $feature.value = ""}
} #end switch
} #end Get-OSVersion
# *** entry point to script ***
$feature = $null
Get-OSVersion -computer $computer -feature ([ref]$feature)
$x = Read-Host 'Installing .Net Framework. Do you want to continue? (y/n)'
if ($x -like 'y')
{
if ($feature.value -ne "")
{
$wc = New-Object System.Net.WebClient
$fullPathIncFileName = $MyInvocation.MyCommand.Definition
$currentScriptName = $MyInvocation.MyCommand.Name
$currentExecutingPath = $fullPathIncFileName.Replace($currentScriptName, "")
$wc.DownloadFile(<DOTNETDOWNLOADURL>, "$currentExecutingPath\dotnetfx35setup.exe")
Install-WindowsFeature -name $feature -source dotnetfx35setup.exe
}
}
else
{
exit 1;
}
|
|
|
|
|
Hi,
sorry, can't ge this to work.
We are using "dism" instead:
edit products.iss:
[Code]
const sFeatureInstall='featureinstall';
procedure AddProduct(FileName, Parameters, Title, Size, URL: string; InstallClean : boolean; MustRebootAfter : boolean);
var
path: string;
i: Integer;
begin
installMemo := installMemo + '%1' + Title + #13;
path := ExpandConstant('{src}{\}') + CustomMessage('DependenciesDir') + '\' + FileName;
if (not FileExists(path)) and not (URL = '') then
begin
path := ExpandConstant('') + FileName;
isxdl_AddFile(URL, path);
downloadMemo := downloadMemo + '%1' + Title + #13;
downloadMessage := downloadMessage + ' ' + Title + ' (' + Size + ')' + #13;
end;
i := GetArrayLength(products);
SetArrayLength(products, i + 1);
// special treatment for bug #11483
if (LowerCase(FileName) = sFeatureInstall) then
products[i].File := sFeatureInstall
else
products[i].File := path;
products[i].Title := Title;
products[i].Parameters := Parameters;
products[i].InstallClean := InstallClean;
products[i].MustRebootAfter := MustRebootAfter;
end;
function SmartExec(prod : TProduct; var ResultCode : Integer) : boolean;
var
showFlag: Integer;
OldState: Boolean;
begin
showFlag := SW_SHOWNORMAL;
//install OS feature (like on server 2008R2 and server 2012, e.g. NetFx3)
if (LowerCase(prod.File) = sFeatureInstall) then
begin
OldState := EnableFsRedirection(False);
try
showFlag := SW_HIDE; //SW_HIDE command line window
Result := Exec(ExpandConstant(''),'/C dism /NoRestart /Online /Enable-Feature:'+prod.Parameters+' /all', '',showFlag, ewWaitUntilTerminated, ResultCode);
finally
EnableFsRedirection(OldState);
end;
end
else
begin//no feature install
if (LowerCase(Copy(prod.File,Length(prod.File)-2,3)) = 'exe') then
begin
Result := Exec(prod.File, prod.Parameters, '', showFlag, ewWaitUntilTerminated, ResultCode);
end
else
begin
Result := ShellExec('', prod.File, prod.Parameters, '', showFlag, ewWaitUntilTerminated, ResultCode);
end;
end;//no feature install
end;
edit dotnetfx35sp1.iss
procedure dotnetfx35sp1();
var
params: string;
begin
if (netfxspversion(NetFx35, '') < 1) then
begin
if (IsWin2012) or (IsWin2008R2) then
begin
params := 'NetFx3';
AddProduct(sFeatureInstall,
params,
CustomMessage('dotnetfx35sp1_title'),
CustomMessage('dotnetfx35sp1_size'),
dotnetfx35sp1_url,
false, false);
end
else
AddProduct('dotnetfx35sp1' + GetArchitectureString() + '.exe',
'/lang:enu /passive /norestart',
CustomMessage('dotnetfx35sp1_title'),
CustomMessage('dotnetfx35sp1_size'),
dotnetfx35sp1_url,
false, false);
end;
end;
|
|
|
|
|
Hi,
what do you mean with bug #11483?
Can you post the code for IsWin2012 and IsWin2008R2?
A little bit off topic:
Have you a solution for Windows 8/8.1? The .NET Framework 3.5 can only be installed with an existing internet connection or with an command prompt and the installation media (Windows DVD)?
Thanks,
Freddy
|
|
|
|
|
Hi,
this bug nummber is a reference to our internal bug tracking system. Don't care about that.
Here are the two functions:
function IsWin2008R2(): boolean;
var
winVersion : TWindowsVersion;
begin
GetWindowsVersionEx(winVersion);
Result := (winVersion.Major = 6) and (winVersion.Minor = 1) and (winVersion.ProductType <> VER_NT_WORKSTATION);
end;
function IsWin2012(): boolean;
var
winVersion : TWindowsVersion;
begin
GetWindowsVersionEx(winVersion);
Result := (winVersion.Major = 6) and (winVersion.Minor = 2) and (winVersion.ProductType <> VER_NT_WORKSTATION);
end;
Regarding to Windows8(.1): No I didn't try that because since we support windows8 we upgraded to .NET4.0.
Regards,
Harald
|
|
|
|
|
Hi! I have a question on your iss file on inno setup.
#define MyAppSetupName 'MyProgram'
#define MyAppVersion '4.0'
OutputBaseFilename={#MyAppSetupName}-{#MyAppVersion}
Can you explain this code?
|
|
|
|
|
MyAppSetupName and
MyAppVersion are constants, defined by this syntax:
#define ConstantName 'Value'
You can use any constant in the iss file by using {#ConstantName}.
InnoSetup will compile you setup program and replace all constants by their respective values.
|
|
|
|
|
Thanks your article..
I can get useful tips of Inno Setup. Great Job!(:
|
|
|
|