Best store it in a configuration file.
Speaking of which, the best way is to first look for the configuration file in the local path (if found, assume portable installation), then look for it in the user profile. If still not found, create one in either location (I don't think there's a standard for assuming portable or non-portable when neither is conclusive).