github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/ci/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  AppPublisher=Cloud Foundry Foundation
     7  ArchitecturesInstallIn64BitMode=x64 ia64
     8  ArchitecturesAllowed=x64 ia64
     9  PrivilegesRequired=none
    10  DefaultDirName={pf}\CloudFoundry
    11  SetupIconFile=cf.ico
    12  UninstallDisplayIcon={app}\cf.ico
    13  
    14  [Registry]
    15  Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; Check: IsAdminLoggedOn and Uninstall32Bit() and NeedsAddPath(ExpandConstant('{app}'))
    16  Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; Check: not IsAdminLoggedOn and Uninstall32Bit() and NeedsAddPath(ExpandConstant('{app}'))
    17  
    18  [Files]
    19  Source: CF_LICENSE; DestDir: "{app}"
    20  Source: CF_NOTICE; DestDir: "{app}"
    21  Source: CF_SOURCE; DestDir: "{app}"
    22  Source: CF_ICON; DestDir: "{app}"
    23  
    24  [Code]
    25  function Uninstall32Bit(): Boolean;
    26  var
    27    resultCode: Integer;
    28    uninstallString: String;
    29    uninstallStringPath: String;
    30  begin
    31    uninstallString := '';
    32    uninstallStringPath := 'SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Cloud Foundry CLI_is1';
    33    RegQueryStringValue(HKLM, uninstallStringPath, 'UninstallString', uninstallString);
    34  
    35    if uninstallString <> '' then
    36    begin
    37      uninstallString := RemoveQuotes(uninstallString);
    38      Exec(uninstallString, '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART','', SW_HIDE, ewWaitUntilTerminated, resultCode)
    39    end;
    40    Result := true;
    41  end;
    42  
    43  #include "common.iss"