A first half goal from Joe Adams was cancelled out by Hallam Hope and the winner came not long before the break courtesy of Scott Twine.
Neil MacFarlane had a strong number of players to choose from in a squad which featured First Team player Shandon Baptiste, who played the first 45 minutes. There were also first Brentford B minutes of the season for Fredrik Hammar after his pursuits at St George's Park earlier in the week. There was also a debut for young Frenchman Tristan Crama who came off the bench in the second period and looked assured.
It was the home side who began to see more of the ball in the opening 10 minutes, but Brentford B forced the first real chance on the counterattack. As The Bees broke at speed, Shandon Baptiste slotted the ball into the path of Aaron Pressley, whose curled effort was well saved by the Town keeper.
The lively Baptiste would then try his luck from the edge of the area, but his right-footed shot edged just wide of the left-hand post.
Jonny Smith then forced Patrik Gunnarsson into a fantastic save around the 15-minute mark when he was found just inside the box before a thumping effort from close range, which seemed destined for the net, was palmed away superbly by the young shot stopper.
The Bees then took the lead in superb fashion when Joe Adams picked the ball up from distance and jinked inside before driving forwards and curling an exquisite low effort into the far corner to make it 1-0.
Taylor Curran would put the ball in at the back post following a deflected cross from the right but for the offside flag. Swindon wouldn’t have to wait long for a response when Hallam Hope finished following a Brentford mistake as they conceded possession high up the field and the home side finished ruthlessly from close range.
With half an hour gone Swindon managed to push themselves in front when a long diagonal out to the right found Jonny Smith who whipped a cross in at pace and Scott Twine did well to cushion the ball with his side foot first time high into the net to make it 2-1 to the home side.
Despite falling behind, Brentford B continued to look bright in attack, and they almost made it 2-2 when one of the Brentford trialists was found in space on the edge of the area but his thunderous effort edged just wide as it crashed against the advertising hoardings behind.
Jonny Smith continued to threaten down the Swindon right and he almost got Swindon’s third when he cut inside a fired an effort towards goal, but he could only find the crossbar as it cannoned back into the area before the Brentford defenders scurried the ball away.
Ken Charles had a good chance shortly after the break for Swindon after a cross from the left managed to evade the Brentford defenders, but the forward’s first-time effort was just over Gunnarsson’s crossbar.
As the game crept towards the hour mark there were fewer chances, but Brentford did manage to create a good opening when one of the trialists passed inside to Julien Carre, and after beating one man, he curled left-footed, but his shot deflected behind for a corner.
A chance would fall to substitute Wraynel Hercules after Kane O'Connor rose at the back post to head across goal, but the winger was unable to get a clean connection as the home side battled back to clear.
Neil MacFarlane also made a number of changes with trialists given the opportunity to impress at The County Ground in the half an hour or so. Brentford continued to see a lot of the ball right up to the closing stages but were unable to find a way to equalise as it finished 2-1 to the hosts.
Swindon Town: Fryer, Curran, Cheshire, Odimayo, Giamattei, Palmer, Charles, Hope, Matthews, J. Smith, M. Smith,
Subs: Twine, Reid, Caddis
Brentford B: Gunnarsson, Koutsimouka, Read (Trialist, 60), Trialist (Crama, 60), Baptiste (Hercules, 45), Hammar (Trialist, 80), Pressley (Trialist, 60), Trialist (Carre, 60), Hockenhull (Trialist, 56), Adams, Stevens (O’Connor, 60)Subs not used: Andersson