This script demonstrates how to determine whether the SMS Advanced Client Software Distribution agent is enabled.

The SWDistClientSettings.SWDistEnabled property determines the agent status by using the following values:


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"
end if

set oSWDist=oUIResManager.GetSWDistClientSettings()

if oSWDist is nothing then
	set oUIResManager=nothing
	wscript.echo "Couldn't get software distribution information - quitting"
end if

if oSWDist.SWDistEnabled=1 then
	wscript.echo "Software distribution:		Enabled"
	wscript.echo "Software distribution:		Disabled"
end if
set oSWDist=nothing 
set oUIResManager=nothing

Compiling the Code

  • Requires an SMS 2003 Advanced Client.

See Also