How to do this on Windows, you need to use the ApplicationData environment variable. If you used C #, you can get the folder that it maps using System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) , googling for the Ruby it ENV['APPDATA'] equivalent ENV['APPDATA'] . In English-speaking Windows, it maps to:
C:\Users\%username%\AppData\Roaming\ (on Vista and Windows 7)
C:\Documents and Settings\%username%\Application Data\ (In XP)
It may appear in another folder in other languages, but as long as you get the directory from the environment variable, and not from the hard code, it does not really matter. If you create a folder for your application and save the data there, Vista and 7 will allow read and write access without providing UAC prompts.
mikel
source share