/build/static/layout/Breadcrumb_cap_w.png

REG DELETE Batch file

Trying to delete a registry value under local machine registry hive. Following script keep looping in a batch file but works fine on a command line? Any advise plz

REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\ABC" /v "ABC100" /F

0 Comments   [ + ] Show comments

Answers (9)

Posted by: bearden3 14 years ago
Purple Belt
2
In the bottom right corner of the post there is "Report | Rate post | Post #:". You can click on "Rate Post" there.

Thanks!
Posted by: bearden3 14 years ago
Purple Belt
0
How about trying "HKLM" instead of "HKEY_LOCAL_MACHINE"?

If from a command prompt you type "reg delete /?", it will give you some examples at the bottom of the help.
Posted by: stabish 14 years ago
Orange Belt
0
HKLM is not working either ;(
Posted by: bearden3 14 years ago
Purple Belt
0
OK, here is an example of one that I used and it doesn't loop:

reg DELETE HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate /f

Since it's DOS (essentially), it shouldn't be case sensitive. I also did not use quotes but then my path doesn't have white spaces either.
Posted by: stabish 14 years ago
Orange Belt
0

reg DELETE HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate /f


This is going to delete the whole registry but im only trying to delete a value under ABC registry...
Posted by: bearden3 14 years ago
Purple Belt
0
I just took your exact string you listed above, pasted it into notepad and saved it as a bat file. I then created the keys (ABC and ABC100) you listed in the bat file. I then ran the bat file and it deleted the ABC100 key, leaving ABC, and terminated with a message "The operation completed successfully."

Is there something else you are doing that you're not mentioning maybe?
Posted by: bearden3 14 years ago
Purple Belt
0
ORIGINAL: stabish
This is going to delete the whole registry but im only trying to delete a value under ABC registry...


Actually, the key word to look for is "example". I wasn't doing the work for you. ;) And to be more technically correct, it would not "delete the whole registry" but only the "Windows Update" key and everything under it - not that you would use that here though...
Posted by: stabish 14 years ago
Orange Belt
0
Yeaaaaaaaaaaaa it worked dude thanks. I guess i was messing with the smae old batch file that i created n started messing with the switches & there might be something that it didn't like so i created a new batch file n copy-paste the script it works like a charm lol
thanks for ur help0 dude ..i'll rate you
Posted by: stabish 14 years ago
Orange Belt
0
How can i Rate?
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ