Samples‎ > ‎WinPack Samples‎ > ‎

Registry Key Set Values Sample

import com.jniwrapper.win32.registry.RegistryKey;
import com.jniwrapper.win32.registry.RegistryKeyValues;

/**
 * This sample demonstrates how to specify attributes for a registry key.
 */
public class RegistryKeySetValuesSample
{
    public static void main(String[] args)
    {
        RegistryKey CLSID =
                RegistryKey.CLASSES_ROOT.openSubKey("CLSID").createSubKey("{13292FC1-9F07-45ef-A444-152BF217982F}", true);
        RegistryKeyValues values = CLSID.values();
        values.put("", "New default value");
        values.put("comment", "New comment");
        CLSID.close();
    }
}