General discussion


Help w/ batch file for SMS 2003

By rotartsinimdA ·
Hi. I have an exisiting batch file that would determine if what OS is on the client then it would would either install the SMS Advance Client or Legacy Client, (also DSclient if OS is not W2K). Need help on constructing a batch that would detect if an SMS client is installed or not.

Also, does anybody know how to install the SMS Advance client, Legacy client & DSclient w/o human intervention?

Thanks in advance!

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by shawn In reply to Help w/ batch file for SM ...

You could use a .VBS file and Windows Scripting Host (WSH) to search through the registry for an entry for the SMS client. For example:

WScript.Echo InstalledApplications(".")

Function InstalledApplications(node)
Set oRegistry = GetObject("winmgmts://" _
& node & "/root/default:StdRegProv")
sBaseKey = _
iRC = oRegistry.EnumKey(HKLM, sBaseKey, arSubKeys)

For Each sKey In arSubKeys

iRC = oRegistry.GetStringValue( _
HKLM, sBaseKey & sKey, "DisplayName", sValue)
If iRC <> 0 Then
oRegistry.GetStringValue _
HKLM, sBaseKey & sKey, "QuietDisplayName", sValue
End If
If sValue <> "" Then
InstalledApplications = _
InstalledApplications & sValue & vbCrLf
End If
End Function

Copy and paste this text, and save it as a .VBS file. When it runs, it will show you what applications are installed on the system. Then you can incorporate this into a larger script that would save the results of the function into a variable and you could search through to see if the SMS client was listed.

Hope this helps.


Collapse -

by shawn In reply to

As for installing the clients, have you checked:

(remove any spaces)

I'm sure the online documentation (specifically the deployment guides) will have the info you're looking for.

Collapse -

by rotartsinimdA In reply to

Hi Shawn,

Thanks for the reply. Actually, I decided to make use of the command IF Exist in my batch file and it looks for an existing file of the SMS client installation such as the ccm.exe.

Thanks for taking time on this matter.


Collapse -

by rotartsinimdA In reply to Help w/ batch file for SM ...

This question was closed by the author

Related Discussions

Related Forums