github.com/jasonkeene/cli@v6.14.1-0.20160816203908-ca5715166dfb+incompatible/installers/windows/windows-installer-x64.iss (about) 1 [Setup] 2 ChangesEnvironment=yes 3 AppName=Cloud Foundry CLI 4 AppVersion=VERSION 5 AppVerName=Cloud Foundry CLI version VERSION 6 DefaultDirName={pf}\CloudFoundry 7 AppPublisher=Cloud Foundry Foundation 8 SignTool=signtool sign /f $qSIGNTOOL_CERT_PATH$q /p $qSIGNTOOL_CERT_PASSWORD$q /t http://timestamp.comodoca.com/authenticode $f 9 ArchitecturesInstallIn64BitMode=x64 ia64 10 ArchitecturesAllowed=x64 ia64 11 12 [Registry] 13 Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; Check: Uninstall32Bit() and NeedsAddPath(ExpandConstant('{app}')) 14 15 [Files] 16 Source: CF_SOURCE; DestDir: "{app}" 17 18 [Code] 19 function Uninstall32Bit(): Boolean; 20 var 21 resultCode: Integer; 22 uninstallString: String; 23 uninstallStringPath: String; 24 begin 25 uninstallString := ''; 26 uninstallStringPath := 'SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Cloud Foundry CLI_is1'; 27 RegQueryStringValue(HKLM, uninstallStringPath, 'UninstallString', uninstallString); 28 29 if uninstallString <> '' then 30 begin 31 uninstallString := RemoveQuotes(uninstallString); 32 Exec(uninstallString, '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART','', SW_HIDE, ewWaitUntilTerminated, resultCode) 33 end; 34 Result := true; 35 end; 36 37 function NeedsAddPath(Param: string): boolean; 38 var 39 OrigPath: string; 40 begin 41 if not RegQueryStringValue(HKEY_LOCAL_MACHINE, 42 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 43 'Path', OrigPath) 44 then begin 45 Result := True; 46 exit; 47 end; 48 // look for the path with leading and trailing semicolon 49 // Pos() returns 0 if not found 50 Result := Pos(';' + Param + ';', ';' + OrigPath + ';') = 0; 51 end;