Saturday, 17 December 2016

Changing registry valvue using command

Sometimes it is difficult or we are lazy to change the registry values through the registry entry by searching the proper path of registry key and  change it. Using the cmd command we can change the registry values instantly and also we can change the registry value of remote computer using psexec tool.

In this tutorial, We will show you one registry example of key EnableLUA (i.e changing user account control by 1 to 0 or vise versa)

In this above screenshot i wrote the cmd command: reg add "hklm\software\microsoft\windows\currentversion\policies\system" /v enablelua /t REG_DWORD /d 0 /f after pressing enter the value of EnableLUA will changes from 1 to 0. You can refresh the registry to see the result or the system is in remote you can enter reg query command to see the change in value, example for reg query command is reg query hklm\software\microsoft\windows\currentversion\policies\system /v enablelua

In this above screenshot you can see the key enablelua    REG_DWORD    0x0, that means value changed to 0.

If you want to do the reverse, just see the below screenshot. the registry value for EnableLUA is set from 0 to 1 and you can see the reg query enablelua    REG_DWORD    0x1 is set to 1.

Info: command line description
  • "hklm\software\microsoft\windows\currentversion\policies\system" (it is registry value path)
  • /v enablelua (/v is key value ex:EnableLUA)
  • /t REG_DWORD (/t is indicates the value type)
  • /d 0 (/d is data that to be change)
  • /f (/f is used for forcefully change the value without asking prompt for yes or no)