/bundles/itninjaweb/img/Breadcrumb_cap_w.png
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   [ - ] Hide Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity

Answers

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.
Answered 05/12/2010 by: bearden3
Purple Belt

Please log in to comment
0
HKLM is not working either ;(
Answered 05/12/2010 by: stabish
Orange Belt

Please log in to comment
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.
Answered 05/12/2010 by: bearden3
Purple Belt

Please log in to comment
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...
Answered 05/12/2010 by: stabish
Orange Belt

Please log in to comment
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?
Answered 05/12/2010 by: bearden3
Purple Belt

Please log in to comment
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...
Answered 05/12/2010 by: bearden3
Purple Belt

Please log in to comment
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
Answered 05/12/2010 by: stabish
Orange Belt

Please log in to comment
0
How can i Rate?
Answered 05/12/2010 by: stabish
Orange Belt

Please log in to comment
2
In the bottom right corner of the post there is "Report | Rate post | Post #:". You can click on "Rate Post" there.

Thanks!
Answered 05/12/2010 by: bearden3
Purple Belt

Please log in to comment