|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.denova.runtime.WindowsCmdFile
|
+--com.denova.runtime.WindowsRegistry
Access the Windows registry.
| Field Summary |
| Constructor Summary | |
WindowsRegistry()
|
|
| Method Summary | |
static boolean |
addSubkey(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.Integer subKeyData)
Adds the subKeyName and its data to the registry if and only if it doesn't already exist. |
static boolean |
addSubkey(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.String subKeyData)
Adds the subKeyName and its data to the registry if and only if it doesn't already exist. |
static boolean |
appendData(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.String subKeyData)
Append subKeyData to the existing data for subKeyName. |
static boolean |
deleteSubkey(java.lang.String keyName,
java.lang.String subKeyName)
Delete subKeyName from registry. |
static java.util.List |
enumerate(java.lang.String keyName,
java.lang.String subKeyName)
Enumerate the keys in the subKeyName. |
static java.util.List |
enumerateData(java.lang.String keyName,
java.lang.String subKeyName)
Enumerate the values in the subKeyName. |
static boolean |
exists(java.lang.String fullKey)
Determines if the key exists or not. |
static boolean |
exportEntries(java.lang.String regFilename,
java.lang.String regKey)
Export part of Windows registry to a file. |
static java.lang.String |
getData(java.lang.String keyName,
java.lang.String subKeyName)
Get the subKeyData for subKeyName. |
static boolean |
importEntries(java.lang.String regFilename)
Import regFilename into Windows registry. |
static boolean |
prependData(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.String subKeyData)
Prepend subKeyData to the existing data for subKeyName. |
static boolean |
replaceBinaryData(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.String subKeyData)
Replaces the binary data for the subKeyName. |
static boolean |
replaceData(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.Integer subKeyData)
Replaces the data for the subKeyName. |
static boolean |
replaceData(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.String subKeyData)
Replaces the data for the subKeyName. |
static java.lang.String |
toUnicode(java.lang.String ascii)
Convert an ASCII string to a UNICODE hex string. |
| Methods inherited from class com.denova.runtime.WindowsCmdFile |
getCommandProgram, getCommandProgramFilename |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public WindowsRegistry()
| Method Detail |
public static java.lang.String getData(java.lang.String keyName,
java.lang.String subKeyName)
keyName - the key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows)subKeyName - the last element of the key
public static boolean addSubkey(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.String subKeyData)
Returns true if add successful.
The keyName must already exist.
keyName - the key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows)subKeyName - the last element of the keysubKeyData - the string data, if any, for the subKeyName
public static boolean addSubkey(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.Integer subKeyData)
keyName - the key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows)subKeyName - the last element of the keysubKeyData - the DWORD data, if any, for the subKeyName
public static boolean replaceData(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.String subKeyData)
keyName - the key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows)subKeyName - the last element of the keysubKeyData - the string data, if any, for the subKeyName
public static boolean replaceData(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.Integer subKeyData)
keyName - the key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows)subKeyName - the last element of the keysubKeyData - the DWORD data, if any, for the subKeyName
public static boolean replaceBinaryData(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.String subKeyData)
The data should be hex encoded into subKeyData. If the hex code is of unicode characters, then the hex must be stored low-endian (e.g., the letters mike would be 6d0069006b006500) No extra notation (0x or commas should be used to designate that the string is a series of hex numbers).
If subKeyName does not exist, then it adds the subKeyName and its associated subKeyData.
The keyName must already exist.
keyName - the key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows)subKeyName - the last element of the keysubKeyData - the string data, if any, for the subKeyName
public static boolean appendData(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.String subKeyData)
keyName - the key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows)subKeyName - the last element of the keysubKeyData - the data, if any, for the subKeyName
You must include any required separators between the existing data and the new data.
public static boolean prependData(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.String subKeyData)
keyName - the key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows)subKeyName - the last element of the keysubKeyData - the String data, if any, for the subKeyName
You must include any required separators between the existing data and the new data.
public static boolean deleteSubkey(java.lang.String keyName,
java.lang.String subKeyName)
keyName - the key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows)subKeyName - the last element of the key
public static boolean exists(java.lang.String fullKey)
fullKey - the full key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows)
public static java.util.List enumerate(java.lang.String keyName,
java.lang.String subKeyName)
keyName - the key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows)subKeyName - the last element of the key
public static java.util.List enumerateData(java.lang.String keyName,
java.lang.String subKeyName)
keyName - the key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows)subKeyName - the last element of the key
public static boolean importEntries(java.lang.String regFilename)
regFilename - full pathname for the .reg file
Runs Regedit.exe or Regedit32.exe from the Windows directory and passes the regFilename as a parameter.
regFilename and Regedit.Exe or Regedit32.exe must exist to be successful.
public static boolean exportEntries(java.lang.String regFilename,
java.lang.String regKey)
regFilename - full pathname for the export fileregKey - key to start the export
Runs Regedit.exe or Regedit32.exe from the Windows directory and passes the regFilename as a parameter.
regFilename and Regedit.Exe or Regedit32.exe must exist to be successful.
public static java.lang.String toUnicode(java.lang.String ascii)
ascii - ASCI string
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||