Final Code I pushed out through SMS and it reported 3607 Received - 3606 Success. I just have to troubleshoot one! =D

Code:
DIM $SO,$programArray,$program
DIM $sp,$os,$path,$packageName

$SO = SetOption('NoVarsInStrings','On')

;########## CHECK TO SEE IF MyODBC DRIVERS ARE ALREADY INSTALLED ##########
$programArray = GetUninstallInfo()

For Each $program In $programArray
If $program = "MyODBC"
quit
Endif
Next


;########## INSTALL MYSQL BASED OFF OF WINDOWS INSTALLER VERSION ##########
$sp = @CSD
$os = @PRODUCTTYPE
$path = "\\gjlk2w2ws101\SoftwarePushes\sms\"
$packageName = "MyODBC-3.51.msi"

if $os = "Windows XP Professional"
if $sp = "Service Pack 1"
SHELL '%COMSPEC% /e:1024 /c '+$path+$packageName+' /qn'
endif
if $sp = "Service Pack 2"
SHELL '%COMSPEC% /e:1024 /c '+$path+$packageName+' /quiet'
endif
else
SHELL '%COMSPEC% /e:1024 /c '+$path+$packageName+' /qn'
endif


;######### START UDFs ###########
Function GetUninstallInfo()
Dim $Index, $Key, $RC, $Value, $RootKey
Dim $progs[0]
$Index = 0

$RootKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"

$Key = EnumKey($RootKey, $Index)
While @Error = 0
ReDim PRESERVE $progs[$Index]
$RC = EnumValue($RootKey + $Key, 1)
If @Error = 0
$Value = ReadValue($RootKey + $Key, "DisplayName")
If $Value = ""
$Value = ReadValue($RootKey + $Key, "QuietDisplayName")
If $Value = ""
$Value = $Key
EndIf
EndIf
Else
$Value = $Key
EndIf
;? $Value
$progs[$Index] = $Value
$Index = $Index + 1
$Key = EnumKey($RootKey, $Index)
Loop
$GetUninstallInfo = $progs
EndFunction



Ok, Ok, I broke down and rewrote it for explicit. =D


Edited by thepip3r (2005-05-05 07:02 PM)