I am trying to deploy the ZenWorks agent through group policy using a VB start up script.  I am getting a Windows Script Host error (The system cannot find the file specified. Line 17 Char 2).  Here is my script.

Option Explicit

Dim strSiteCode
Dim strMode
Dim strParams

If WScript.arguments.count > 0 Then
strParams = WScript.arguments(0)
End If

Dim WshShell, lngExitCode
Set WshShell = CreateObject("WScript.Shell")

If ClientInstalledAndAuto("") = False Then
Dim oExec, strCmdLine
strCmdLine = ScriptDir & "\PreAgentPkg_AgentComplete.exe" & strParams
lngExitCode = WshShell.Run(strCmdLine, 0, True)
WshShell.LogEvent 0, "Started ZCM agent install: """ & strCmdLine & """" & CHR(10) & "Exit code was " & CSTR(lngExitCode)
Else
WshShell.LogEvent 0, "ZCM agent is installed and set to Automatic.  No action required."
End If

Function ScriptDir
ScriptDir = Left(WScript.ScriptFullName,Len(WScript.ScriptFullName) - Len(WScript.ScriptName) -1)
End Function

Function ClientInstalledAndAuto(strComputerName)
ClientInstalledAndAuto = False
On Error Resume Next

If Len(strComputerName) = 0 Then
strComputerName = "."
End If

Dim objWMI, objList, objItem

Set objWMI = GetObject("winmgmts://" & strComputerName & "/root/cimv2")
If err.number <> 0 Then
Exit Function
End If

strMode = ""

Set objList = objWMI.ExecQuery("Select StartMode from Win32_Service where Name=""Novell ZENworks Agent Service""")
For Each objItem In objList
strMode = objItem.StartMode
Exit For
Next

If strMode = "Auto" Then
ClientInstalledAndAuto = True
Else
ClientInstalledAndAuto = False
If Len(strMode) = 0 Then
WshShell.LogEvent 0, "Novell ZENworks Agent Service not found."
Else
WshShell.LogEvent 0, "Novell ZENworks Agent Service is to: " & strMode
End If
End If

End Function

I have placed the agent exe file in the Group Policy, start up scripts folder that my script is in.

I need help in the worst way.  I anyone can help me, it would be much appreciated.

Thanks
Joshua Brannon