Tuesday, September 11, 2012

Use of tracking app to find stolen iPad 'legal' - ABC News (Australian Broadcasting Corporation)

Use of tracking app to find stolen iPad 'legal' - ABC News (Australian Broadcasting Corporation): "Walker said if it was trespassing, then every time somebody turns on their radio they to would be breaking the law."

'via Blog this'

If you find this article useful please leave me a comment or click on an ad to show your support.

Tuesday, September 04, 2012

How to Run a Program on a Configuration Manager Client

How to Run a Program on a Configuration Manager Client: "How to Run a Program on a Configuration Manager Client"

I found that the code included on the webpage didn't work when used in VBscript.

This code does:


Runprogram "ProgramName","ProgID"

Sub RunProgram(programId, packageId)

    'On Error Resume Next

    Dim oUIResource 
    Dim oPrograms 
    Dim oProgram 

    Set oUIResource = CreateObject ("UIResource.UIResourceMgr")

    If oUIResource Is Nothing Then 
        wscript.echo "Could not create Resource Object - quitting"
        Exit Sub
    End If

    if oUIResource.IsMandatoryProgramPending = 1 Then
        Wscript.Echo "Mandatory program pending. Try again later."
        Set oUIResource=Nothing
        Exit Sub
    End If

    Set oProgram = oUIResource.GetProgram(programId,packageId)
    if oProgram is Nothing Then
        WScript.Echo "Couldn't get the program"
        Set oUIResource=Nothing
        Exit Sub
    End If
    
    Wscript.Echo "Running program: " & oProgram.FullName
    oUIResource.ExecuteProgram programId, packageID, TRUE

    Set oProgram=Nothing
    Set oUIResource=Nothing

End Sub