Saturday, June 27, 2009

Right click Status Messages

I received a nice email from Robert Mitsch about my status messages right click tool. Back in the days of SMS 2003 in late 2005 I had tried to work with the statview.exe application for the status messages but didn't have the time nor could I find some good documentation so I just kept it the way it was with statusmessages.exe. Well he has it working with statview. Shown below is the new method. The differences are as follows:
1. No longer to you need to select server and hit enter
2. Messages no longer pull ALL messages in. This caused problems sometimes. It now pulls in around 1 month of messages.

<parameters>/SMS:Server=\\##SUB:__Server## /SMS:Path=##SUB:__Namespace## /SMS:System=##SUB:Name##</parameters>

Changes will be made here on SCCM Tools website

and on my original blog post

Monday, June 8, 2009

Removing registry keys with Regedit

Many times working with sccm we need to push out registry keys which is easy with a .reg file and regedit...."regedit /s key.reg" This adds all your keys to the registry and is very quick at it.

But what if you want to remove keys. Well you can use Vbscript or other lang to edit the registry or you can use a regedit. Yup a special "minus" sign will remove a key or tree.

[HKEY_LOCAL_ MACHINE\SOFTWARE\Policies\Microsoft\Windows\System\xwing]

Say we want to remove the entire tree. We do this by sending the reg file with the following change

[-HKEY_LOCAL_ MACHINE\SOFTWARE\Policies\Microsoft\Windows\System\xwing]

Everything in xwing and sub keys will be deleted.

Now say you want to just delete key2 then you send this
[HKEY_LOCAL_ MACHINE\SOFTWARE\Policies\Microsoft\Windows\System\xwing]

This will remove only key2 from the registry.

What is nice about this is that it won't throw an error if nothing is there so you can send it down to all machines whether they have the key or not.

MS KB article