After he has shown there is strength, wisdom, and counsel in God, he finally shows that God is intelligent, understanding by this the knowledge which He has of hidden things, which seem above all to designate what is hidden in the heart. He shows that God knows these things by the fact that he works in the hearts of men, and thus he knows the hidden things of hearts like his own effects. So he says, "It is he who changes the heart of the leaders of the people of the land," with respect to their wills. As Proverbs says, "The heart of the king is in the hand of the Lord, who will incline it to w...hatever he wills." (21:1) Although God inclines the wills of all men, yet special mention is made of kings and princes because their wills carry more weight, for many follow their will. As to the intellect he adds, "he deceives them," which means certainly not that he leads them into falsity, but because he takes his light away from them, so that they may not know the truth, and clouds their reasoning power so that they cannot find suitable means to do the wicked deeds which they propose. So he then says, "so that they proceed in vain and along a trackless way," that is, so they proceed by ways which are unfitting, by means of which they cannot arrive at their end. One errs in acting in two ways: first, by ignorance, and regarding this he says, "they will grope in the darkness and not in the light," so that ignorance is designated by darkness and knowledge by light. Some grope in ignorance like blind men when they only consider what they can feel is right in front of them as if by touch. Some err in another way in actions because of their passions, by which their reason is bound in particular choices, so that they do not apply universal knowledge to action. As to this he adds, "and he will make them wander like drunkards," for their reason is so bound by passion that it is like a kind of drunkenness.
Source: Commentary on Job