[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1277
  • Last Modified:

Need to edit batch file to delete a registry folder

I need to edit this batch file to delete the ENTIRE MSLicensing folder in the registry, not just the key and contents within that folder.

@echo off
setlocal
call :Quiet>nul 2>&1
set key=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing
for /f "Tokens=*" %%a in ('REG QUERY %key%^|find /i "%key%\"') do (
 @echo REG DELETE "%%a" /F
 REG DELETE "%%a" /F
)
endlocal
goto :EOF
:Quiet
NET START TERMSERVICE
0
murryc
Asked:
murryc
  • 2
1 Solution
 
and235100Commented:
@echo off
reg delete HKLM\SOFTWARE\Microsoft\MSLicensing /f
0
 
murrycAuthor Commented:
Perfect!
0
 
and235100Commented:
Thank you.
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now