First: Check the first important registry

reg query HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer /v AlwaysInstallElevated

image.png

Second: Check the second important registry

reg query HKCU\\SOFTWARE\\Policies\\Microsoft\\Windows\\Installer /v AlwaysInstallElevated

image.png

Third: Create a malicious package with msfvenom and install it as elevated