M
Mark Sizzler
I would like to write some values into a new/existing key in the Registry.
An often shown example is the following:
....
Preferences p = Preferences.userRoot();
p.put("aBbbCccDdd", "bar");
...
This example has multiple disadvantages and problems:
1.) The values are always written to the branch:
HKCU\Software\Javasoft\Prefs
How do I write them to:
HKCU\Software\MySoft123 ?
2.) The example above shows how to create a new value but NOT how to create
a new key. How do I create a new key?
3.) The value name which is created by the example above is NOT as expected "aBbbCccDdd"
but "a\Bbb\Ccc\Ddd" instead.
Are capital letters ALWAYS automatically masked ?
How can I put capital letters into value names without masking?
4.) The example above shows how to store strings (REG_SZ) values in Registry but not how to
store numbers. How do I store numbers?
To sum up all I would like to do store the following:
HKCU\Software\MySoft123 Value=aBbbCccDdd Type=REG_SZ Data="bar"
and
HKCU\Software\MySoft123 Value=YyyZzz Type=REG_DWORD Data=888 (decimal)
How can I achieve this?
Mark
An often shown example is the following:
....
Preferences p = Preferences.userRoot();
p.put("aBbbCccDdd", "bar");
...
This example has multiple disadvantages and problems:
1.) The values are always written to the branch:
HKCU\Software\Javasoft\Prefs
How do I write them to:
HKCU\Software\MySoft123 ?
2.) The example above shows how to create a new value but NOT how to create
a new key. How do I create a new key?
3.) The value name which is created by the example above is NOT as expected "aBbbCccDdd"
but "a\Bbb\Ccc\Ddd" instead.
Are capital letters ALWAYS automatically masked ?
How can I put capital letters into value names without masking?
4.) The example above shows how to store strings (REG_SZ) values in Registry but not how to
store numbers. How do I store numbers?
To sum up all I would like to do store the following:
HKCU\Software\MySoft123 Value=aBbbCccDdd Type=REG_SZ Data="bar"
and
HKCU\Software\MySoft123 Value=YyyZzz Type=REG_DWORD Data=888 (decimal)
How can I achieve this?
Mark