Showing posts with label microsoft. Show all posts
Showing posts with label microsoft. Show all posts

6/27/2011

SCCM Asset Intelligence - List manufacturer friendly names

This Query will list all possible manufacturer listings of an application and the friendly names (grouped)

SELECT Distinct CommonPublisher,Publisher
FROM v_LU_SoftwareList
INNER JOIN V_LU_Softwarehash ON V_LU_Softwarehash.SoftwareID = v_LU_SoftwareList.SoftwareID
ORDER BY CommonPublisher

2/01/2011

vbScript - Get running environment

The following vbScript Function delivers the value true if the script runs within a task sequence environment. If not the functions delivers the value false. This function can be useful in scripts like wrapper and so on.


...
If RunningInTaskSequence = True Then
...

Function RunningInTaskSequence()
On Error Resume Next
Err.Clear
Dim objTSEnv : Set objTSEnv = CreateObject("Microsoft.SMS.TSEnvironment")
If Err Then
'Script does not run within the Task Sequence environment
RunningInTaskSequence = False
Else
'Script does run within the Task Sequence environment
RunningInTaskSequence = True
End If
On Error GoTo 0
End Function