Question : Problem: About Registry

Hi Friends,

I am sridhar, I don't know anything about registry. Tell me how do you get the information about the users who have logged on the network using a VB or a VC program at run-time. In which key is the information stored?

Answer : Problem: About Registry

I hope these information could help you.

The Registry is the central repository in which Windows 95 stores all its configuration data. The Windows 95 system configuration, the PC hardware configuration, Win32-based applications, and user preferences are all stored in the Registry. For example, any Windows 95 PC hardware configuration change that is made via a Plug and Play device is immediately reflected in a configuration change in the Registry. Because of these characteristics, the Registry serves as the foundation for user, system, and network management in Windows 95.
The Registry essentially replaces the various MS-DOS and Windows 3.11 configuration files, including AUTOEXEC.BAT, CONFIG.SYS, WIN.INI, SYSTEM.INI, and the other applications’ .INI files. However, for compatibility purposes, instances of CONFIG.SYS, WIN.INI, and SYSTEM.INI files may exist on a Windows 95 PC for backward compatibility with either 16-bit device drivers or 16-bit applications that must run on Windows 95. For example, 16-bit applications will probably continue to create and update their own .INI files.
The Registry concept in Windows 95 is built upon the Registry concept first implemented in Windows NT. The Registry is a single configuration datastore built directly into the operating system. Although it is logically one datastore, physically it consists of three different files to allow maximum network configuration flexibility. Windows 95 uses the Registry to store information in the following three major categories:
·      User-specific information, in the form of User Profiles, is contained in the USER.DAT file.
·      Hardware or computer-specific settings (the Hardware Profile) are contained in the SYSTEM.DAT file.
·      System Policies are designed to provide an override for any settings contained in the other two Registry components. System Policies may contain additional data specific to the network or corporate environment, as established by the network manager. They are contained in the POLICY.POL file. Unlike SYSTEM.DAT and USER.DAT, POLICY.POL is not a mandatory component of a Windows 95 installation.
 
Together, these three components comprise the Registry. Breaking the Registry into these three logical components provides the following benefits:
·      The Registry components can be located in physically different locations. For example, the SYSTEM.DAT component and other Windows 95 system files might be located on the PC’s hard disk, and the USER.DAT component might be located in the user’s logon directory on a network server. With this configuration, users can log on to various PCs on the network and still have their unique network privileges and desktop configuration, allowing the “roving user” network configuration for Windows 95.
·      All of the Registry files and the rest of the system files in Windows 95 can be installed on a network server. This configuration enables Windows 95 to be run on a diskless or remote initial program load (RIPL) workstation or from a floppy disk boot configuration. With this scenario, Windows 95 can be configured to page to a local hard disk but still load all its system files from a server.
·      The Registry and all of the system files can be installed on the local hard disk. With this configuration, multiple users can share a single Windows 95 PC. Each user has a separate logon username, separate user profile, separate privileges, and separate desktop configuration.
·      The network manager can administer an entire network’s user privileges by having a single, global POLICY.POL file. Or the network manager can establish these policies on a server basis or on a per-user basis. In this fashion, a network manager can centrally enforce a “common desktop configuration” for each end-user type. For example, a data-entry Windows 95 PC can be configured so that only two applications—the data entry application and e-mail—can be run. Additionally, the network manager can specify that data-entry users cannot modify this desktop configuration. In spite of this configuration, the Windows 95 PC can fully participate in the network and is fully configurable if a different user with more network privileges logs onto the same PC.
·      Separate privileges can be assigned to users and to a PC. For example, if a user who has sharing privileges logs onto a Windows 95 PC that has no sharing (no peer services), the user cannot access the PC’s resources. This feature is useful if certain PCs contain sensitive data that should not be available to everyone on the corporate network.
 
The Registry contains ordered pairs of keys and their associated values that are manipulated via the Win32 Registry APIs. For example, the Registry might have a Wallpaper key with an associated value of WORK.BMP, meaning that the current desktop background is configured to use the “Work” bitmap.
Additionally, a special category of keys known as dynamic keys are either pointers to a memory location or a call-back function. Dynamic keys are a new Registry enhancement in Windows 95. They are used by device drivers or Windows 95 subsystems that want to register a dynamic data type, such as a counter, in the Registry. In the case of network cards, the dynamic keys represent data such as data transfer rates, number of framing errors, packets dropped, and so on. In general, dynamic keys are used for data that is updated frequently and is therefore not well suited for storage in the disk-based Registry. Because the dynamic keys exist in memory, their data can be quickly updated and quickly accessed. The data can be accessed by the system performance tools in Windows 95, which call the Registry for the data they are monitoring.
Arbitrary keys and values can be created either programmatically or by using the Registry Editor (REGEDIT) tool. The APIs for managing the Registry are the Win32 Registry APIs, which can be remotely invoked via the Microsoft RPC (DCE-compliant) support built into Windows 95. Windows 95 includes both the client and server portions of Microsoft RPC, making the Registry manageable remotely from another Windows 95 PC. In this scenario, the network manager’s system is the RPC client. It accesses the Registry APIs on the target Windows 95 PC via the RPC server running on the target machine. This RPC access to the Registry is secure, and network managers can limit access to either named privileged users or a group of network managers.
The Registry is also editable using the Registry Editor utility. As shown in Figure 61, the Registry consists of various parallel “trees.” The Registry Editor is built upon the RPC support and can edit the local Windows 95 Registry, as well as the Registries on remote Windows 95 PCs. Although the Registry Editor is very powerful, it is fairly rudimentary in design and is intended for use by knowledgeable PC and network support staff or power users. Most end-users will never use the Registry Editor because Registry entries are usually modified via the Control Panel, by applications, or via Plug and Play.
Figure 61. The Registry Editor, showing the settings stored in the Registry, which can be accessed remotely
As Figure 62 illustrates, the Registry is the central datastore that all system management services build upon. Note that all key subsystems are united by the Registry, and “agents” for standard management protocols, such as SNMP, are implemented for Windows 95 using the Registry and Registry services.
Figure 62. The Windows 95 management architecture, showing the central role of the Registry

 

Random Solutions  
 
programming4us programming4us