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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove Multiple Collections From SMS Database

Status
Not open for further replies.

RubberyDuck

Technical User
Sep 13, 2005
2
GB
Hi,

How do I remove all collections for a single client within SMS Automatically?

I know this can obviously be done one by one but some clients have 10 - 20 apps installed on them via SMS.

If you wonder why I ask, it is because some machines need to be rebuilt (corrupt os, etc) from time to time but the netbios name stays the same for the machine and then re-installs all application associated with the netbios name from SMS.

TIA :)
 
so you want the machine name out of all the collections? just go to the all systems collection and delete the machine.

Now having said that, depending on how you made your collections it will repopulate those collections if they were query based. If they are static entry based collections you will be fine.
 
One last thing that helps in this situation is to put logic into your install script that if it sees a programs certain registry key to bail out of the installation as it is already installed....so the sms packages runs, it just exits when it sees that the program exists before it actually installs anything, but will give a completed succesful tag on the sms package.

so with sms installer it would look something like this:

item: Set Variable
Variable=LOGS
Value=\\servershare\logs\sms\reader7.3
end


item: Get Registry Key Value
Variable=DISTILLER
Key=SOFTWARE\Adobe\Acrobat Distiller\7.0
Value Name=InstallPath
Flags=00000100
end
item: If/While Statement
Variable=DISTILLER
Value=C:\Program Files\Adobe\Acrobat 7.0\Distillr
end
item: Execute Program
Pathname=%mycom%
Command Line= /c echo %myname%, Has distiller as of ,%systime% >> %logs%\distiller\%myname%.log
Flags=00001000
end
item: Sleep
Sleep=2000
end
item: Exit Installation
Variable=0
Flags=0
end
item: End Block
end
 
Thank you for the response, I'll give that a go tomorrow at work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top