How do you deploy the odbc msi so that its installed...
am 19.10.2006 20:12:05 von PoohbaI have a script that should allow all users access. Its a login script
that will just log computer information into the db. I currently have
the script working and adding to a file but a db would be more
manageable. I have mysql installed on my system and the script works
fine on my system of course. How do I get this installed on all
machines? I tried through group policy but that just added to the add
new programs menu. I need it installed on all machines. I thought that
if I were to push it out and then have the script run on the machine it
would auto install but that doesn't happen. Is there another way I need
to run a request to have it auto-install? The script is below:
Dim Path, WSLSerialNumber
Dim objFileSystem, objOutputFile
Dim strOutputFile
Dim objDB,arrRecord,strRecord,strOutput
Dim oRS, nRec, oFld
'Main Processing section
'Database connection & select all from Table
Set objDB = DBConnect()
Set FSO = CreateObject("Scripting.FileSystemObject")
Set WshNetwork = WScript.CreateObject("WScript.Network")
' ---------Get Serial Number from WMI \root\cimv2 & WIN32_BIOS
strComputer = "."
'-----------------------------------------
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colBIOS = objWMIService.ExecQuery _
("SELECT * FROM Win32_BIOS")
Set colItems = objWMIService.ExecQuery _
("SELECT * FROM Win32_Bus")
For Each objBIOS in colBIOS
'check to see if machine support smbios data
If objBios.smbiosPresent = "True" then
Else
WSLSerialNumber = "@NA"
End If
'For Each objItem in colItems
If objBIOS.SerialNumber <> "" Then
WSLSerialNumber = objBIOS.SerialNumber
Set TextFile = FSO.OpenTextFile("\\fileserver\shared\" &
WshNetwork.Computername & ".txt", 8, True)
TextFile.Writeline WshNetwork.Computername & ":" & WSLSerialNumber & ":"
& objBIOS.SerialNumber & ":" & wshNetwork.UserName
Set oRS = objDB.Execute("insert into computers.login
(serial,machine,user,date,time) values('" & WSLSerialNumber & "','" &
WshNetwork.Computername & "','" & wshNetwork.UserName &
"',now(),now())")
Set objFileSystem = Nothing
End if
Next
If WSLSerialNumber = "" Then
WSLSerialNumber = "@NA"
End if
'Procedures section
'This function sets up DB Connection using specified DSN
Function DBConnect
Set objDB = CreateObject("ADODB.Connection")
objDB.Open "mysqlodbc"
Set DBConnect = objDB
End Function
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org