Jump to content

Recommended Posts

Posted

Im trying to get a reg key deleted using RunOnceEx, but I keep getting prompted for confirmation, despit the /f switch...

REG ADD %KEY%\022 /V 01 /D "REG DELETE \"HKEY_CURRENT_USER\Software\VicMan Software\" /f" /f

Ive followed some guides for allowing the use of extra quotes in such instructions from http://unattended.msfn.org/intermediate/me...s/runonceex.htm which I have implemented successfully for other instances.

However, it seems to be ignoring the /f

Driving me nuts!!!

Thanks


Posted

lol.. yet again fooled by its simplicity...

sticking a - infront of the regkey in reg file, removes it!!!

I can delete it and import it all in the same reg file!!!

Posted (edited)
Im trying to get a reg key deleted using RunOnceEx, but I keep getting prompted for confirmation, despit the /f switch...
REG ADD %KEY%\022 /V 01 /D "REG DELETE \"HKEY_CURRENT_USER\Software\VicMan Software\" /f" /f

Ive followed some guides for allowing the use of extra quotes in such instructions from http://unattended.msfn.org/intermediate/me...s/runonceex.htm which I have implemented successfully for other instances.

However, it seems to be ignoring the /f

Driving me nuts!!!

Thanks

Meaby you should use REG DELETE instead of REG ADD ;)

So it would be like

REG DELETE /VE /D "HKEY_CURRENT_USER\Software\VicMan Software" /f

If you would like this key get run by RunOnceEx you can use the following:

REG ADD %KEY%\022 /V 01 /D ^"REG DELETE /VE /D \"HKEY_CURRENT_USER\Software\VicMan Software\" /f\"^" /f

By using the ESCAPE Character Windows will process the quotes as a regular expression. Please report if this works :)

Edited by hp38guser
Posted
Meaby you should use REG DELETE instead of REG ADD
You have done the same here
REG ADD %KEY%\022 /V 01 /D ^"REG DELETE

????

"REG DELETE \"HKEY_CURRENT_USER\Software\VicMan Software"

This is the line that would be entered into the ROE registry, and should delete the regkey... but it wasnt...

As I was applying reg settings for my Ua installed apps, it is easier to simply remove the key with the [-hkey...] syntax, and then import the new settings, from the same regfile.. easy peasy!!!

I did not know about the ^ key, only putting / before the quotes which you wanted to show... as per instructions in the link... I will test that out at some point... but Im happy with the method I have now.. its simple!!!

Thanks for your help...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...