Have some problems with NSIS uninstall code.
RMDir /r "$SMPROGRAMS\${PRODUCT_NAME}"
In Windows 7 this code uninstall files from the folder, but don’t uninstall the folder in Start Menu.
In Windows XP this code don’t uninstall anything. It’s just don’t work.
Make sure that you aren’t trying to RMDir the current working directory.
From the NSIS Documentation: