Uh..... no, that was Aliens.
The marines set up motion sensored machine gun turrets in several tunnels. The last gun nearly runs out of ammo before the xenomorphs end their attack, and engage in a sneak attack through the ceiling.
I wouldn't be surprised if another movie ripped this scene off as Alien (and Aliens) had its fair share of imitators.
While you are of course entirely correct, you left out that the scene where the aliens are held off by the guns was cut from the theatrical release
. (I don't remember if them setting up the guns and testing them was in the theatrical release, but I do know that before setting them up Hicks lists them amongst their assets.)
That scene is available on the DVD version, although I don't remember if it's been reinserted into the movie (i.e. a Director's cut) or is an extra (deleted scene). This may be why the OP thought Aliens
was not the correct movie, if he only rewatched the theatrical release.