Erik van Rooyen of South Africa and England's Lee Slattery are tied at the top of the leaderboard with Wiesberger on 14-under for the tournament.
World No 396 Slattery and Van Rooyen both signed for their second successive rounds of 64.
But it was Wiesberger, having returned from a seven-month injury absence earlier this year, who stole the show, firing the lowest round of his European Tour career, rolling in 11 birdies.
"It's been tough the last year," he said. "Coming off injury, it's been hard but winning in Denmark a couple of weeks ago is a big boost to me.
"I am really enjoying my time out on the golf course again, maybe I take it not as seriously as I've done before and let it go and that really helped me, just feeding off rounds like this today."
World No 3 McIlroy sits six shots off the leaders after a second straight 67, as he bids to win the seventh national Open of his career.
McIlroy has won the US, British, Canadian, Australian, Irish and Hong Kong Opens.
"It's a cool thing to do," said the four-time major winner. "A lot of these Opens, Scottish Open, whatever, they are over a hundred years old, so to put your name on trophies like that is a pretty cool thing."
But the Northern Irishman's main focus will be on finding his best form before the start of the British Open next week at Royal Portrush, where he will play in a major on home soil for the first time.
"I'm slowly getting back to where I want to be," said McIlroy, who started the year ranked eighth.
"I'm very pleased with my year and there's still a little bit left to go, but I feel like my game's in good shape to finish the season off the right way."
Ian Poulter managed a 67 to move within four strokes of the leading trio, while former PGA Championship winner Justin Thomas powered to a 64 and sits one better.
"I feel comfortable, over really a lot of my game right now," said world No 9 Thomas.
"I just need to keep continuing to do that, not only for the rest of the week but the rest of the season."
Matt Kuchar, who was tied for the lead after the first day, fell back with a 70, while Rickie Fowler's preparations for his latest tilt for a maiden major title suffered a blow as he missed the cut by a single shot on four-under.
Leading scores from the second round of the European Tour's Scottish Open at North Berwick on Friday (par 71/GBR & IRL unless stated):
128 - Lee Slattery 64-64, Erik van Rooyen (RSA) 64-64, Bernd Wiesberger (AUT) 67-61
130 - Nino Bertasio (ITA) 63-67, Henrik Stenson (SWE) 65-65
131 - Adrian Otaegui (ESP) 67-64, Guido Migliozzi (ITA) 66-65, Justin Thomas (USA) 67-64, Lorenzo Gagli (ITA) 68-63, Kalle Samooja (FIN) 64-67
132 - Ian Poulter 65-67, Edoardo Molinari (ITA) 63-69, Thomas Pieters (BEL) 64-68, Matthew Fitzpatrick 67-65, Renato Paratore (ITA) 67-65, Brandon Stone (RSA) 68-64, Calum Hill 68-64, Romain Langasque (FRA) 65-67, Sean Crocker (USA) 66-66
133 - Lucas Herbert (AUS) 67-66, Matt Kuchar (USA) 63-70, Rafael Cabrera Bello (ESP) 66-67, David Horsey 67-66, Oliver Wilson 65-68, Andy Sullivan 64-69, Pablo Larrazabal (ESP) 67-66, Jamie Donaldson 64-69, Darren Fichardt (RSA) 66-67, Max Schmitt (GER)
134 - Matt Wallace 68-66, Rory McIlroy 67-67, Eddie Pepperell 67-67
136 - Tyrrell Hatton 70-66
137 - Martin Kaymer (GER) 68-69, Lee Westwood 70-67
138 - Rickie Fowler (USA) 71-67, Li Haotong (CHN) 73-65
141 - Kevin Kisner (USA) 70-71