[PATCH] D129263: Windows packaging script. Check administrator permissions and/or 7-Zip version.

Carlos Alberto Enciso via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 04:55:40 PDT 2022


CarlosAlbertoEnciso added a comment.

Thanks to @hans and @thieta for the patch approval.

But looking with more detail, I found an issue while determining if the script is running with elevated permissions.

- The test is expecting that the `%SYSTEMROOT%\SYSTEM32\WDI\LOGFILES` permissions have not been changed.

However, those permissions can be changed (at least on my machine as normal user), following the following steps:

1. Try to open that folder with Windows Explorer.
2. You get a warning message `You don't have currently permission to acces this folder.`
3. An option is presented `Click Continue to permanently have access to this folder.`
4. After that the script will fail, as the user now has access to that folder.

I found another way (I think more robust) to check for administrator, by using the 'mklink' command.

- It requires administrator permissions to create a symbol link.

Uploaded new patch with these changes.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129263/new/

https://reviews.llvm.org/D129263



More information about the llvm-commits mailing list