What Firefox does is to add the path to its executable to the "App Paths" subkey, which is the preferred solution against modifying the 'path' environment variable. To make the same for lazarus, you can add a
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\lazarus.exe
key having the (Default)
value of the path to the executable, e.g.: X\...\lazarus.exe
To have an effect on all users, you can use the machine counterpart of course
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
See documentation for more details.