Cita:
|
Empezado por alt126
- Comprobar que el access esta instalado a partir de la version 2000.
|
Hola Antonio!
Aquí tienes un script para Inno Setup que detecta cuál versión de MS Access está instalada, si es que existe alguna
Espero que te sea útil.
Script tomado de la página
Inno Setup Extensions Knowledge Base/How to detect if and wich version of MSAccess is installed
[code]
;
; ISX 3.0.2
;
;
[Setup]
AppName=MSAccessVersion
AppVerName=MSAccessVersion
DefaultDirName={pf}\MSAccessVersion
DisableStartupPrompt=true
Uninstallable=false
DisableDirPage=true
OutputBaseFilename=MSAccessVersion
Código:
// Legenda
// 8.00.00.3512 Access 97
// 8.00.00.4122 Access 97 SR1
// 8.00.00.5903 Access 97 SR2
// 9.00.00.2719 Access 2000
// 9.00.00.3822 Access 2000 SR1
// 9.00.00.4506 Access 2000 SR2
// 10.00.2627.1 Access XP
function AccessVersion(): String;
var accversion, accpath: String;
begin
accversion := '';
if RegQueryStringValue(HKEY_LOCAL_MACHINE,
'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\MSACCESS.EXE',
'', accpath) then
begin
// in varResult there is path of msaccess.exe
GetVersionNumbersString( accpath, accversion );
end;
Result := accversion;
end;
function InitializeSetup(): Boolean;
var accver: String;
begin
accver := AccessVersion();
if Length( accver ) > 0 then
begin
MsgBox( 'Version ('+ accver +') of MS Access is installed.',
mbInformation, MB_OK );
// go on with setup
Result := true;
end
else begin
MsgBox( 'MS Access is not installed.', mbInformation, MB_OK );
// cannot go with setup anyway
Result := false;
end;
end;