Can I read windows registry?

I want to save files into user data path…

For example:
If we log in to the computer as “Mr.A”, when we play the game and click save, the saved file goes into C:/Document&Setting/…/Mr.A/savedfile

If we log in as “Mr.B”, then the saved file goes into C:/Document&Setting/…/Mr.B/savedfile

I think I’m gonna need to read the windows register.
Does anybody know how to do it?
Or is it possible ?

:shock:

It should be available via Mono’s Microsoft.Win32.Registry class.

http://www.go-mono.com/docs/index.aspx?tlink=13@ecma%3A0%23Registry%2F

There is no need to go low-level. Take a look at System.Environment.GetFolderPath and System.Environment.SpecialFolder

That way you will not lose compatibility with Mac OS X (the function also returns values that make sense on OSX) and you don’t have to worry about the details of grokking the registry.

So to get the path to the user-specific Application Data directory you can do something like this (in JavaScript - untested):

import System.Environment;
// ... 
var folderPath = GetFolderPath(SpecialFolder.ApplicationData);