I recommend merging this method with GetString: add a new boolean parameter to GetString that controls environment variable expansion.