Here are some interesting Operating system and softwares tips and tricks 4u.JUST CLICK ON THE PICTURE IN THE BLOG FOR ENALARGED VIEW.

sd

Sunday, February 19, 2012

Edit registry directly from the command line(Windows 7)

             The Powershell in the latest Windows version is a real high performance tool. With its help, you can not only work on scripts, but also edit registry settings.
             The Powershell has an extensive set of commands and works in an object-oriented manner. That is why it is possible to directly access the registry from a central location. The Shell can integrate and treat main branches as separate virtual drives. For example, the virtual drive for ‘HKEY_CURRENT_USER’ is called ‘HKCU’.
              To navigate, use the ‘cd’ command or the new command ‘Set-Location’ as in case of file folders. Some keys of the registry exist as sub-folders in the file system, so that the remaining file commands can be used. The query of certain registry values however diff erentiates itself from others, as the system considers it as properties of the key. If you enter ‘dir’ or ‘Get-ChildItem’, and press [Enter], Windows lists the sub-keys available in the folder, but not the available values. Two preceding columns show how many sub-keys (SKC) and values (VC) every element contains. The ‘Get-ItemProperty’ command, to which you need to transfer at least one directory path as argument, serves in the query of individual values. You can use a dot as a placeholder for the current path. The query can be restricted with the help of other parameters. To enter the Powershell mode, you will need to type ‘powershell.exe’ in the command prompt. An example explains the procedure: Enter the following in Powershell:
cd HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer dir
      The output shows all available sub-keys. The fi gures before the entries show how many sub-keys and values are included in it. For instance, for the element ‘Advanced’, these are ‘0’ other sub-keys, but ‘20’ values. With
cd Advanced
      you can go to this key. Practically, incomplete entries can be automatically completed via the [Tab] key. Even entering ‘cd a’ and pressing [Tab] is sufficient. Now query all available values via the ‘Get-ItemProperty’ command.
Get ItemProperty.–name:ShowInfoTip
      On the other hand, it returns this registry value with the result ‘1’. This value ‘1’ is an element in a matrix structure. In this script, assign the result to a variable to be able to work with it further. You will thus be able to change even the values in the registry with the commandlet ‘Set-ItemProperty’. As an argument, you will again need the virtual path, the name of the value as parameter as well as the desired value. For instance, Set-ItemProperty.–name:ShowInfoTip 0
      sets the value of the specifi ed characters to ‘0’. The command ‘New- ItemProperty’ generates new values, and ‘Remove-ItemProperty’ deletes values. To create new keys, use ‘New-Item’ or the ‘md’ command known from the file system, and ‘Remove-Item’ to remove a key. With ‘Test-Path’, you can check whether a key exists. The query ‘Get- Help’ provides help to use the command, followed by a command as argument.

0 comments:

Post a Comment

please write your comment

Note: Only a member of this blog may post a comment.

THE WINDOWS TRICKS Headline Animator