how to delete registry key in batch file without asking permission

piaakit
piaakit used Ask the Experts™
on
Dear All

 
               How do i remove reg key without asking yes or no ? i have put /f at the back of the command but doesnt look like correct, i want to create a login bat to GPO, any help would be appreicated

1
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
NVITEnd-user support

Commented:
That looks  correct. It's saying it cant' delete it because the key doesn't exist. Verify the key with REG QUERY

You could keep it that way. If the key is there, it's deleted.

Author

Commented:
yes you are correct, and by looking at the registry location, the SusClientid is removed ?

1
2
NVITEnd-user support

Commented:
Because you are deleting a value, it should be like this...

reg delete hklm\software\microsoft\windows\currentversion\windowsupdate /f /v SusClientId

Open in new window

Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Author

Commented:
is it something wrong ?



1

Author

Commented:
resolved, my typing mistake
NVITEnd-user support

Commented:
Hi piaakit... Would you please close this question. Thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial