Let's go through the plan of Hans Gruber without the interference from John McClane.
- Infiltrate Nakatomi Tower with his goons and take the Christmas party-goers hostage.
- Get the vault password from Takagi (or kill him, doesn’t really matter).
- Have Theo hack most of the vault locks.
- Call the police and pretend to be terrorists.
- Annihilate the SWAT team with rocket launchers.
- Wait until FBI shows up and cuts the power to the building, thus unlocking the last lock.
- Steal $640 million in bearer bonds.
- Blow up all the hostages on the roof with C4 when the FBI gunship shows up and escape in the confusion.
Hans was, as it seems so, great at planning. He planned this to every detail. He knew that Takagi won't give him the password, but it really didn't matter because Theo was going to hack it anyway. They planned to call themselves terrorists so FBI can show up and cut the power which eventually open the last lock.
He knew functioning of FBI and police. You can see that he identifies both FBI agents.
It is unclear to me how Hans is planning to accomplish that.
It is not really explained in the movie, but it is not hard to assume.
Hans was going to blow up the terrace with C4, so FBI and police get diverted and he can escape. He and his gang weren't going to show themselves to the police. They had planned escaping in the ambulance which Theo gets ready near the end. So, if they'd have blew up the terrace with hostages and didn't reveal themselves, everybody would assume that they also died in the blast.
Without McClane causing a ruckus, it is likely that cops wouldn't have shown up to cut of the power and there would have been no uninvited guest who couldn't be identified afterwards.
They were going to call the police anyway even if McClane doesn't show up. Also note that their plan wasn't altered that much even when McClane showed up. Things only went bad when McClane got their detonators and explosives.