Sign in to follow this  
Followers 0
HaeMHuK

Is it possible to search in windows dhcp?

2 posts in this topic

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"

Share this post


Link to post
Share on other sites



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. :huh2:


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0