Actually the main reason for the hostage crisis you can boil down to Zbigniew Brzezinski convincing Carter not to essentially extradite the Shah to Iran after he was overthrown, essentially convincing Carter that the Shah was still worth something politically to the US (which at the time he wasn't as he no longer had control of his country and NO supporters left over there). There was no love for the US at that point from Iran but Iran had not yet solidified itself into the Islamic Republic as it is today (i.e. Khomeini was a major player but he hadn't yet killed off all the competition within the ranks of the rebellion) . That pretty much solidified them actually taking the US embassy. FYI and this is interesting, current Iranian President Mahmoud Ahmedinijad was one of the folks who did take the embassy and he was pushing for taking the Soviet (read: Russian) embassy at the time.
If the hostages were taken, there wouldn't need to be a war or invasion really. Just contact the hostage takers, hand them over Rezah Pahlevi in exchange for the hostages, and shake hands essentially and work out diplomatic relations given the regime change. We probably could have swayed it away from becoming what it is now, although I'm unsure of when during the hostage crisis Khomeini consolidated his power.