Alexey Verkhovsky wrote:
> On 8/14/07, Austin Ziegler <[EMAIL PROTECTED]> wrote:
>> And the Windows solution?
>
> There should be one, of course.
>
> There is no good place in Windows to keep system-wide overrides, other
> than the registry.
We're just talking about a config file, right?
require 'win32/dir'
Dir::COMMON_APPDATA => "C:\\Documents and Settings\\All
Users\\Application Data"
Many apps use Dir::APPDATA or Dir::COMMON_APPDATA for config files on MS
Windows.
If you want to use Win32API directly, it's:
require 'Win32API'
CSIDL_COMMON_APPDATA = 0x0023
path = 0.chr * 260
SHGetFolderPath = Win32API.new('shell32','SHGetFolderPath','LLLLP','L')
SHGetFolderPath.call(0, CSIDL_COMMON_APPDATA, 0, 1, path)
puts path.strip
Regards,
Dan
_______________________________________________
Rubygems-developers mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rubygems-developers