HaeMHuK Posted June 22, 2011 Posted June 22, 2011 Hi all! Is it possible to search in windows dhcp? I've found a script, but dhcp.mdb is not accessible to be opened. There is an error that it is busy under some other process. Do you have any suggestions? $conn = ObjCreate("adodb.connection") $conn.Open("DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\\......\dhcp.mdb") $rs = ObjCreate("adodb.recordset") $sql = "select * from test_table" $rs = $conn.execute($sql) While $rs.EOF = False $var = $rs("IP") MsgBox (0, "0", $var) $rs.MoveNext Wend $rs.Close $conn.close $rs= "nothing" $conn = "nothing"
hannes08 Posted June 22, 2011 Posted June 22, 2011 Hi HaeMHuK, as far as I know, you cannot access it via ADODB. You'll need to use "netsh" to read from the DHCP Database. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now