If you make a full installer for your product in NSIS, make sure you do the following to avoid this dilemma:
; This will write a registry string with the path to your product.
; You can use HKEY_LOCAL_MACHINE instead of HKLM if you wanna be
WriteRegStr HKLM "SOFTWARE\CompanyName\ProductName" "InstPath" "$INSTDIR"
; Obviously, unless your product is called "ProductName" and your company called "CompanyName" you're gonna need to change it to the name of your product and company.
And when you want to make an upgrade for your product, use this:
; This will read your product's install path to the user variable $5
; Why $5? Because I like 5.
ReadRegStr $5 HKLM "SOFTWARE\CompanyName\ProductName" "InstPath"
You can then use InstallDir in the following way
in order to install the upgrade to the same directory.