Registry key for the system path of path
!define Product_uninst_root_key the abbreviation of "HKLM"//hkey_local_machine
!define path_key "SYSTEM\CurrentControlSet\Control\Session manager\environment"//path corresponding to the registry key under HKLM
Field area added after installation is complete
Var VPath//new Plus, custom variable to accept the value of the variable in the original path
Section-post
Writeuninstaller "$INSTDIR \uninst.exe"
Writeregstr ${product_uninst_root_key} "${product_uninst_key}" "DisplayName" "$ (^name)"
Writeregstr ${product_uninst_root_key} "${product_uninst_key}" "UninstallString" "$INSTDIR \uninst.exe"
Writeregstr ${product_uninst_root_key} "${product_uninst_key}" "DisplayVersion" "${product_version}"
Writeregstr ${product_uninst_root_key} "${product_uninst_key}" "Urlinfoabout" "${product_web_site}"
Writeregstr ${product_uninst_root_key} "${product_uninst_key}" "Publisher" "${product_publisher}"
Readregstr $vPath ${product_uninst_root_key} "${path_key}" "PATH"//Take the original value
strcpy $vPath "$vPath + $INSTDIR"//String connection
Writeregstr ${product_uninst_root_key} "${path_key}" "PATH" "$vPath"//write new value
Sectionend
The end, thank you!
NSIS adding an Application installation path to path