Yes, and those situations are when that wa is the grammatical topic marker. Both こんにちは and こんばんは were probably part of some longer question, like こんにちはどうやっているんですか (or probably something more accurate), which would mean "how are you doing today." They were then shortened to their present forms.