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!

Delete Registry Key.

Status
Not open for further replies.

mikehday

MIS
Mar 28, 2003
116
0
0
US
I'm trying to delete a registry key on all advanced SMS clients. Half fail ... the others succed. Its a simple script ... and when I run it manually on the clients the script runs succesfully. The error that is returned from SMS is vauge of coure (exit code 1).

Does anyone have a clue why it doesn't run on some clients but does on others?

Here's the little script: "\\sms-server\E$\packages\scripts\Reg delete "hklm\SOFTWARE\Microsoft\SMS\Mobile Client\Software Distribution\Execution History\System\CA100051" /force
 
A couple guesses..Are you running it with user rights? If so, do all the users have admin rights?
 
no ... the program is setup to "Run with Administrative rights".
 
have you had a chance to see if perhaps the key on any of the machines is corrupt?

And I guess the other thing I've had with scripts is, are you copying it to the local machine or running it from the server, at times, when I try to run a boatload of machines all at once with one script and all off a server share, it seems like it gets to busy to run to many at once, when I copy the script to the local machine it seems to fix the problem.
 
I'll setup my next test to copy the script to the client.

For the 14 out of 28 that did failed with SMS i ran manually on each box and only one did not run locally because the registry key did not exist.
 
Rather than using a script, export the key using regedit, modify the export file to delete the key ("-" in front of key name ... then use the command line "regedit.exe /s <name of export file>"

I like using regedit because its made for manipulating the registry more so than, say, vbscript ... plus it's easier.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top