Question

c:>REG QUERY HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run 

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
  XSENZ REG_SZ C:\Windows\syswow64\XSENZ.EXE
  Persistence REG_SZ C:\windows\system32\igfxpers.exe
  IntelliPoint REG_SZ "c:\Program Files\Microsoft IntelliPoint\ipoint.exe"
  IgfxTray REG_SZ C:\windows\system32\igfxtray.exe
  HotKeysCmds REG_SZ C:\windows\system32\hkcmd.exe

I want to get only first column. Can anyone suggest an answer?

Was it helpful?

Solution

for /f %%a in ('REG QUERY HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run') do @echo %%a|find /v "\"

should work for you. If you are running directly from the prompt, reduce %% to %

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top