For a very very long time there I'd only ever formally learned the blues and pentatonic scales, I've been looking to change that recently, but to be honest I don't think I'll ever be Satriani in that regard.
I know very little theory, and that which I do know was picked up on purely a practical basis over time.
When writing solos I just try to play what I think suits the song, on an off day I'll hit something out of key because I don't know the "no go" frets for every key, theoretically.
Based entirely on prior practical playing of the actual instrument I know what sound comes off each fret and I work off that.