Vista has the UAC rules, you should write your data to specific folders only (%USERPROFILE%\AppData\Local, for example), or you have to modify your installer to allow "program files" folder access for your application (this is the very bad way).
btw, under xp or win2k we have the specific places to store an application data too (like "Documents and Settings\All Users\Application Data", for example).
Refer to msdn, please; look for the SHGetKnownFolderPath (SHGetFolderPath).