http://cscl.googlecode.com/git-history/7afe1832dc1b4b616420d2cbe5609274b4de72d1/Docs/Sourcegrid/SourceGrid_EN.html
http://kb.cnblogs.com/a/1211123/ (chinese)
Friday, 22 June 2012
Tuesday, 19 June 2012
InnoSetup function to check .Net version
function IsDotNetDetected(version: string; service: cardinal): boolean;
// Indicates whether the specified version and service pack of the .NET Framework is installed.
//
// version -- Specify one of these strings for the required .NET Framework version:
// 'v1.1.4322' .NET Framework 1.1
// 'v2.0.50727' .NET Framework 2.0
// 'v3.0' .NET Framework 3.0
// 'v3.5' .NET Framework 3.5
// 'v4\Client' .NET Framework 4.0 Client Profile
// 'v4\Full' .NET Framework 4.0 Full Installation
//
// service -- Specify any non-negative integer for the required service pack level:
// 0 No service packs required
// 1, 2, etc. Service pack 1, 2, etc. required
var
key: string;
install, serviceCount: cardinal;
success: boolean;
begin
key := 'SOFTWARE\Microsoft\NET Framework Setup\NDP\' + version;
// .NET 3.0 uses value InstallSuccess in subkey Setup
if Pos('v3.0', version) = 1 then begin
success := RegQueryDWordValue(HKLM, key + '\Setup', 'InstallSuccess', install);
end else begin
success := RegQueryDWordValue(HKLM, key, 'Install', install);
end;
// .NET 4.0 uses value Servicing instead of SP
if Pos('v4', version) = 1 then begin
success := success and RegQueryDWordValue(HKLM, key, 'Servicing', serviceCount);
end else begin
success := success and RegQueryDWordValue(HKLM, key, 'SP', serviceCount);
end;
result := success and (install = 1) and (serviceCount >= service);
end;
function InitializeSetup(): Boolean;
begin
if not IsDotNetDetected('v4\Client', 0) then begin
MsgBox('MyApp requires Microsoft .NET Framework 4.0 Client Profile.'#13#13
'Please use Windows Update to install this version,'#13
'and then re-run the MyApp setup program.', mbInformation, MB_OK);
result := false;
end else
result := true;
end;
Monday, 18 June 2012
Monday, 11 June 2012
Subscribe to:
Posts (Atom)