Look, it’s 2005 and you’re not allowed to just spooge your .ini and .tmp files all over the filesystem anymore, full stop. In a sane world, you never would have in the first place, but Win95 sucked, Win98 sucked and nobody using WinNT ever turned that shit on, so I can understand how you got into the habit. But those days are over, so for the love of all that is sane and sacred, you need to knock that shit off.
Use your environment variables. The machine knows where you can write, and where you can’t, so ask. It’s not rocket science; not like deciphering your oblique, pointless numbered error messages, anyway.
Look, if you’re a programmer, you’re probably local-admin on your box. So get yourself a typical, unprivileged-user account on your machine and do your thing. And if your thing fails dramatically in the first twenty seconds of use, maybe you should figure out why before you ship.