>>Install the application where it belongs, Program Files or Program Files (x86). If data is local, put it in \Users\Public\YourApp or \Users\UserName\AppData if the data is per user.
FWIW, UAC sometimes seems to be able to identify an executing app's folder and add protection, after which writing to subfolders requires elevation. So your apps are protected- but can't write to the data or ini files etc. So I agree with the advice re program files (x86) and data completely separately in %appdata% or %programdata% or on a share, depending what you're up to.
To the OP- also consider that ini files and foxuser.dbf are read-only if they're in the app folder...
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us."
-- Shakespeare: Coriolanus, Act 1, scene 1