Help
Help

Reputation: 181

Windows - Command To Find Out If A Registry Path Exists Or Not

I need help with a Windows command that output's if a registry path exists, or not. For example, if the registry path I have specified below exists on my Windows Machine, it should output something like, "registry path exists": HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\MSV1_0\NTLMMinClientSec

I have not been successful in trying to create such a code, can anyone help me?

Upvotes: 0

Views: 1836

Answers (1)

motosubatsu
motosubatsu

Reputation: 445

You can do this from Powershell using the Test-Path cmdlet

Test-Path "HKLM:\System\CurrentControlSet\Control\Lsa\MSV1_0\NTLMMinClientSec"

You'll get "True" if it exists "False" if not.

Upvotes: 2

Related Questions