MSFN Forum: Can someone help with the syntax? - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Can someone help with the syntax? Rate Topic: -----

#1 User is offline   drscouse 

  • Member
  • PipPip
  • Group: Members
  • Posts: 237
  • Joined: 03-January 04

Posted 28 September 2005 - 06:32 AM

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

Quote

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


#2 User is offline   drscouse 

  • Member
  • PipPip
  • Group: Members
  • Posts: 237
  • Joined: 03-January 04

Posted 28 September 2005 - 07:12 AM

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!!!

#3 User is offline   Acheron 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 915
  • Joined: 28-June 04

Posted 28 September 2005 - 10:22 AM

drscouse, on Sep 28 2005, 01:32 PM, said:

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

Quote

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
<{POST_SNAPBACK}>


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 :)

This post has been edited by hp38guser: 28 September 2005 - 10:23 AM


#4 User is offline   drscouse 

  • Member
  • PipPip
  • Group: Members
  • Posts: 237
  • Joined: 03-January 04

Posted 28 September 2005 - 11:08 AM

Quote

Meaby you should use REG DELETE instead of REG ADD
You have done the same here

Quote

REG ADD %KEY%\022 /V 01 /D ^"REG DELETE


????

Quote

"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...

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy