Wireshark-commits: [Wireshark-commits] master-3.2 d941650: NSIS uninstaller: ensure the uninstaller

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 25 Jul 2020 19:19:28 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=d941650f2e61c5f2c6df593504c3807dcd94553d
Submitter: "Graham Bloice <graham.bloice@xxxxxxxxxxxxx>"
Changed: branch: master-3.2
Repository: wireshark

Commits:

d941650 by Graham Bloice (graham.bloice@xxxxxxxxxxxxx):

    NSIS uninstaller: ensure the uninstaller runs with elevated privileges
    
    The uninstaller should run with elevated privileges to allow deletion
    of files from protected directories.
    
    Modifying the uninstall script to require elevation then causes the
    uninstaller_installer that creates the uninstaller to also require
    elevation which happens at build time so defeat that
    by setting the env var __COMPAT_LAYER to "RunAsInvoker" before calling
    the uninstaller_installer.
    
    Achieving this from CMake requires a script to call to set the env var
    and then calling the executable.
    
    Change-Id: I056931bc4f9b41877b8f31d765d49fee11b54e39
    Reviewed-on: https://code.wireshark.org/review/37955
    Petri-Dish: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
    (cherry picked from commit cc2474533859b0f01ac650dddbf97affb6b199e3)
    Reviewed-on: https://code.wireshark.org/review/37959
    

Actions performed:

    from  d4a4e16   ftype-time: Use time zone from hfinfo->display
     add  d941650   NSIS uninstaller: ensure the uninstaller runs with elevated privileges


Summary of changes:
 packaging/nsis/CMakeLists.txt    |  2 +-
 packaging/nsis/makeUninstall.ps1 | 47 ++++++++++++++++++++++++++++++++++++++++
 packaging/nsis/uninstall.nsi     |  1 -
 3 files changed, 48 insertions(+), 2 deletions(-)
 create mode 100644 packaging/nsis/makeUninstall.ps1