-3

My Batch-Programm ist supposed to remove registery listings to delete a folder from my Spacetree

I would like to combine it with some java code, but it asks me for permission when started (as shown in the picture 1) This asking is the problem why my java programm isn't working the way I want to, therefore I have to get rid of the asking

Does anyone know how to do that?

My Code:

@Echo OFF
reg delete HKCU\Software\Classes\CLSID\{5107667c-149a-47c8-b0c9-e4bf9132f17d}
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{5107667c-149a-47c8-b0c9-e4bf9132f17d}
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel

1) [The Output of my Programm]: https://i.stack.imgur.com/5NKQL.png

  • I have to enter whether I would like to execute my action or not
Stephan
  • 53,940
  • 10
  • 58
  • 91

1 Answers1

3

Use reg delete /?:

Prompt>reg delete /?

REG DELETE KeyName [/v ValueName | /ve | /va] [/f] [/reg:32 | /reg:64]
...
  /f         Forces the deletion without prompt.
Dominique
  • 16,450
  • 15
  • 56
  • 112
  • Yeah for me as a newcomer this wasn't very helpful. It's just that /f after every line which makes what I want Still thank you – SerjiLike Jul 18 '19 at 10:27
  • 5
    @SerjiLike, the advice in the above answer appears to exactly solve your issue. Dominique has specifically copied filtered content, which is readily available when reading the commands usage information, as well as showing you how to view it yourself. The filtered output highlights exactly the `/F` option you required, _(and you have confirmed was what you needed)_. Please accept their solution as it is the only one you needed and is how this site works. – Compo Jul 18 '19 at 12:47