Remote registry access

zhaozj2021-02-08  229

Remote registry access

Registry Access Control (Registry Access Control) is a Server Component written with VC, which encapsulates all the operations of the registry, usually used to extend registry access to VB or other programming tools. Features. System administrators can embed it into the ASP page to implement maintenance of the WEB server or remote host registry system. This is a free control, you can download from Microsoft's site. RAC has two versions of Alpha and i386, and the file name is REG.DLL. Select one of them according to your own platform, then use the DOS command to register: Regsvr32 reg.dll / s RAC has 12 methods, you can add, delete, query, and copy, delete, query, and copy, delete, query, and copy by them can Wait actions. The apps in VB and ASP will be described below and discussed how to solve potential security issues. First, the application of RAC in VB first adds an Iissample Registry Access object library in the reference list of the project, and then defines a registry object with the following statement: DIM REG AS New RegistryAccess.cRegobj can pass all the operations of the registry through the REG object The method is completed, for example: 1. Read the statement below the Registry Shows the class path of the Java virtual machine: debug.print reg.get ("HKLM / Software / Microsoft / Java VM / ClassPath") reads the registry Another method is getExpand, which can read the attribute values ​​of the REG-Expand-SZ, REG-DWORD, and REG-SZ types, the difference between getExpand and GET lies in: getExpand replaces the environment variable in the return value to the actual value. Under Windows NT,% SystemRoot% will be replaced with: C: / WinNT, and Get will not. To replace the environment variables in the registry to actually values, you can use the expandstring method. 2. Modify the command below the registry to change the name attribute value under the HKLM / Software / Alexander key to jQ: reg.set "HKLM / Software / Alexander / Name", "jq", TRUE similar approach else has setExpand, it Set the data type of the registry attribute value to: REG-Expand-SZ, indicating that the environment variables are included, and can be extended with getExpand. In the above example, HKLM is HKEY-local-machine abbreviation, and the last parameter indicates that the modification will be immediately written back to the registry instead of staying in the buffer. The remaining methods are: CopyKey, deletekey, deletevalue, valueetype (Data type of the attribute value), Keyexists (determining if a button exists), their usage is relatively simple, Not one of them here. Finally, before using the program, don't forget to destroy the registry object with the following statement: set reg = Nothing 'reg.dll Still residing in memory, the main purpose of the registry Microsoft Development RAC is to expand the ASP through the RAC Registry Access Function to maintain the registry system of the remote host.

转载请注明原文地址:https://www.9cbs.com/read-3387.html

New Post(0)