Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing Registry Key Via SMS

Status
Not open for further replies.
Feb 27, 2008
32
0
0
CA
Hello Everyone,

I have been pushing out program installs and removals through SMS for about 6 months now and am quite confident in that aspect BUT am not too sure how to delete a registry key through SMS. I've created a .reg file and also a batch file and pushed both out to a test PC, I see that the file has been sent but do not see any successes or failures.

Is there a better way to push a registry deletion through SMS?

Here is a sample of the script I wrote (not sure if it even works)

Windows Registry Editor Version 5.1

[HKEY_LOCAL_MACHINE\Software\Network Associates\Epolicy Orchestrator\Agent\AgentGUID]
"AgentGUID"=-

I tried pushing this out as a batch and a reg file but nothing seems to happen.

Thanks

Mike
 
Perhaps try doing a

REG DELETE "HKLM\SOFTWARE\Network Associates\Epolicy Orchestrator\Agent\AgentGUID\AgentGUID=youranswer" /f

from a batch file instead.

SimonD.

The real world is not about exam scores, it's about ability.

 
Thank you Simon, stupid question....in your command where you have "youranswer" am i suppose to put a value of delete or true there?

Mike
 
Yes, in actual fact you should be able to just do REG DELETE "HKLM\SOFTWARE\Network Associates\Epolicy Orchestrator\Agent\AgentGUID\AgentGUID" /f as that will delete the key for you (leaving any other entries in there).

I was having a bit of a blonde moment.

SimonD.

The real world is not about exam scores, it's about ability.

 
Still no luck, here is the batch file I wrote

REG DELETE "HKLM\SOFTWARE\Network Associates\Epolicy Orchestrator\Agent\AgentGUID" /f

SMS returned an error message with a status of 1 notifying me that the program failed.

Thanks
 
You may have to put the entire entry in there, so that you delete AgentGUID=1 instead of AgentGUID

SimonD.

The real world is not about exam scores, it's about ability.

 
Thank you Simon. All your help is greatly appreciated.

I've modified the batch file.

REG DELETE "HKLM\SOFTWARE\Network Associates\Epolicy Orchestrator\Agent\AgentGUID=1" /f
 
the =1 thing might not be the entry tho, you need to see what your entry says and then change the batch file accordingly (I don't use EPO so it was only a guide).

SimonD.

The real world is not about exam scores, it's about ability.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top