在Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" 到第一个Section之间插入一行代码
RequestExecutionLevel admin
完整示例:
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" OutFile "setup.exe" InstallDir "d:xxx" InstallDirRegKey HKLM "${PRODUCT_UNINST_KEY}" "UninstallString" ShowInstDetails show ShowUnInstDetails show BrandingText "xxx" RequestExecutionLevel admin Section "XxxSection" SEC01