Inno Setup - Verificando Se Existe Determinada Chave No Registro Do Windows

1
Inno Setup - Verificando se existe determinada Chave no Registro do Windows O Inno Setup é o instalador oficial do nosso site. Aqui trazemos mais uma dica deste fantástico gerador de instalações, onde demonstramos como verificar se uma determinada chave existe no registro do Windows: [Setup]AppName=VerificaChave AppVerName=VerificaChave DefaultDirName={pf}\VerificaChave DisableStartupPrompt=true Uninstallable=false DisableDirPage=true OutputBaseFilename=VerificaChave [Code] function InitializeSetup(): Boolean; begin if RegKeyExists(HKEY_LOCAL_MACHINE, ‘SOFTWARE\Firebird Project\ FirebirdServer’) then begin MsgBox(‘ Não posso instalar! ‘,mbInformation, MB_OK ); Result := false; End Else Result := true; end; Isso é muito interessante, por exemplo, para verificar se uma determinada aplicação já existe no computador do cliente

description

Dicas Inno Setup

Transcript of Inno Setup - Verificando Se Existe Determinada Chave No Registro Do Windows

Page 1: Inno Setup - Verificando Se Existe Determinada Chave No Registro Do Windows

Inno Setup - Verificando se existe determinada Chave no Registro do Windows 

O Inno Setup é o instalador oficial do nosso site. Aqui trazemos mais uma dica deste fantástico gerador de instalações, onde demonstramos como verificar se uma determinada chave existe no registro do Windows:

[Setup]AppName=VerificaChaveAppVerName=VerificaChaveDefaultDirName={pf}\VerificaChaveDisableStartupPrompt=trueUninstallable=falseDisableDirPage=trueOutputBaseFilename=VerificaChave

[Code]function InitializeSetup(): Boolean;begin if RegKeyExists(HKEY_LOCAL_MACHINE, ‘SOFTWARE\Firebird Project\FirebirdServer’) then begin MsgBox(‘ Não posso instalar! ‘,mbInformation, MB_OK ); Result := false; End Else Result := true;end;

Isso é muito interessante, por exemplo, para verificar se uma determinada aplicação já existe no computador do cliente