If you tried to imagine which of the mediocre comedies produced by Hollywood over the last decade was least deserving of a sequel, “Miss Congeniality” might rise close to the top of the list. Its script, about a tomboy FBI agent going undercover as a beauty pageant contestant to catch a crook, was unpardonably feeble, and the execution was rote, with only a flamboyant supporting turn by Michael Caine standing out. But the picture was a middling success at the boxoffice, and star Sandra Bullock was also the producer, so perhaps a follow-up to the 2000 flick was inevitable. But as “Miss Congeniality 2: Armed and Fabulous” decisively proves, inevitability doesn’t insure quality. Despite the subtitle, it’s an utterly mediocre comedy that shoots blanks.

The picture picks up pretty much where the first left off, with Gracie Hart (Bullock) reveling in not only her new-found celebrity but also the affection of Eric Matthews (Benjamin Bratt), the colleague who fell for her over the course of the contest. But things quickly change as Gracie’s notoriety blows an undercover operation at a bank and an offscreen Matthews dumps her. (Bratt doesn’t appear in the movie at all, but his presence lingers over the entire picture like some bad aroma that air fresheners can’t obliterate.) Hart thereupon reverts to her klutzy, sad-sack persona, depressed over both Matthews’ decision and his promotion to an office far from New York, only to find that her boss (Ernie Hudson) has decided that the only way he can keep her in the field is to make her the celebrity “face of the FBI,” a well-coifed, beautifully-dressed fashion queen who’ll write a book about her experiences and travel about the country promoting it and interacting with her adoring public. To that end she’s assigned a flamboyantly gay stylist (Diedrich Bader, stepping in for Caine) to keep her looking like a porcelain princess and an ill-tempered bodyguard-agent named, in a cinematic in-joke, Sam Fuller (Regina King), an African-American woman with attitude problems. The main plot kicks in after about thirty minutes, when–just as Gracie and her entourage reach Las Vegas–sweet Cheryl (Heather Burns), who won the Miss United States Pageant, and its dumb-as-a-post, supervain M.C. Stan Fields (William Shatner) are kidnapped in the same city. She insists on joining the investigation, much to the displeasure of the arrogant station chief (Treat Williams), who assigns one of his men–sweet but goofy Foreman (Enrique Murciano)–to keep an eye on her. Naturally, he’ll become her helper instead.

In working out the complicated but simple-minded scenario that follows from these premises, Marc Lawrence–one of the three writers who penned the first movie–throws in everything but the kitchen sink. He provides ample opportunities for Bullock to engage in “I Love Lucy”-style physical shtick, going so far as to invent an especially unfunny episode in which she tackles Dolly Parton and another in which she, King and Bader dress up as supposed female impersonators to get backstage at a drag club (as well as a third in which she’s encased in really poor old-lady makeup). Sitting uncomfortably alongside these are the ostensible “deductive” moments when Hart unravels the facts behind the kidnapping–bits that involve the antics of the dim-bulb crooks, brothers Lou and Karl Steele (Abraham Benrubi and Nick Offerman, the former of whom played much the same part in the recent “Without a Paddle”) and what feels like endless scenes of Cheryl and Stan trussed up and threatened with death. Then there are the obligatory duet scenes in which Fuller loosens up and bonds with Hart over reams of saccharine girl talk (but not before they indulge in bouts of really unpleasant slapstick violence, which are intended to be funny but come off as just nasty). A bit of schmaltzy drivel concerning Gracie’s concern for a little girl who’s a fan of hers is even dropped in to offer material for a supposedly touching epilogue. And naturally there’s a big finale in which Gracie saves the day. None of this stuff works particularly well on its own, but taken together it’s pretty much a mess, with the elements jostling against one another so clumsily that at times it seems you’re watching several different movies spliced together. The effect is accentuated by the John Pasquin’s lax, lazy direction, which indulges Bullock entirely too much; she’d be much more attractive and engaging if the character were kept on a somewhat tighter leash. Bader gets his share of laughs with the broad gay gags, but most are distinctly old-hat, while King is more convincing as the mean-spirited Fuller of the initial reels than the supportive helpmate of the later ones, and isn’t particularly amusing as either. Burns, Hudson and Williams are pretty much wasted, and Shatner sends himself up once more, to ever-decreasing effect. The only person in the cast, in fact, who emerges with some real charm is Murciano (a regular on “Without a Trace”), who has to work overtime as the agent torn between obeying his boss and helping Gracie, but comes off pleasantly understated in a part that could have been a disaster. Technically “Miss Congeniality” is okay, though hardly top-grade.

At the end of “Miss Congeniality 2”–which, at just a tad under two hours, is really unconscionably long for a movie this flimsy–the notion that originally set the plot in motion, that Gracie is too well known to be useful in the field, is just conveniently forgotten, even though she’s just become even more famous as the result of her latest exploit. That’s illogical, but perhaps useful in that it teaches us the virtue of forgetfulness, especially of bad movies such as this one. As for Las Vegas, which is featured here (at least in exterior shots) at its most garish, maybe the CSI team can investigate how a stiff like this wound up in their town.