I found this script on Microsoft's web site. It displays the status of the
SMS software distribution agent. What I would like it to do is actually
change the agent from "enabled" to "disabled" I want to disable the
software agent on our Terminal servers so advertised programs don't run on
these machines. Thanks.
-Ben
on error resume next
dim oUIResManager
dim oSWDist
set oUIResManager = createobject("UIResource.UIResourceMgr")
if oUIResManager is nothing then
wscript.echo "Couldn't create Resource Manager - quitting"
Wscript.Quit
end if
set oSWDist=oUIResManager.GetSWDistClientSettings()
if oSWDist is nothing then
set oUIResManager=nothing
wscript.echo "Couldn't get software distribution information - quitting"
Wscript.Quit
end if
if oSWDist.SWDistEnabled=1 then
wscript.echo "Software distribution: Enabled"
else
wscript.echo "Software distribution: Disabled"
end if
set oSWDist=nothing
set oUIResManager=nothing