Wireshark-commits: [Wireshark-commits] master-2.6 268ec81: NSIS uninstaller: ensure the uninstaller

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

Commits:

268ec81 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 ac2883f5e8e0a461ba06733294738358eb527b8c)
    Reviewed-on: https://code.wireshark.org/review/37961
    

Actions performed:

    from  2e557ac   ftype-time: Use time zone from hfinfo->display
     add  268ec81   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