Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

Auto set hostname after ghost

  • Please log in to reply



    New Member

  • Member
  • Pip
  • 1 posts
I work at a public school with several computer labs which tend to get overloaded with junk fairly often, as such it seems I'm constantly going up to computers with my little ghost diskette which maps a network drive and reimages the computer.

I'm in the process of setting up a PXE boot image such that if needed I can PXE boot a computer and it will automatically do the reimage. Using tftp it is fairly easy to set it up so that it uses the correct image for a given lab based on the mac address of the computer.

My problem: There is a mandatory scheme to be used for computer naming, and I would like to set it up so that after ghosting a computer, the correct computer name is automatically set. This name is based on the computers inventory number, so it is not something that can be generated.

I do have a table in a MySQL server which links hardware (MAC) addresses to their proper computer names. Thus my first thought was to write a script that connects to the SQL server, and does a simple query such as "SELECT hostname FROM mac_hostname WHERE mac_address='blah';", sets the hostname using the newsid utility from sysinternals, and then modifies a flag in the registry that essentially tells the script to bypass this whole procedure on future boots.

Does anybody else do anything similar or have any other suggestions on how I might implement this functionality?
  • 0


Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP