Change machine name/IP address

Quick question: I need to change the machine name programmatically. I wasn't able to spot
the API call quickly, and hoped that someone might have the answer.

Why? We're ghosting 20-30 machines at once from the same master, and need to run a program
that will 

(a) Set the machine name (it will prompt, and the names are of the form XXXXnnnn where
nnnn is a 4-digit number)
(b) Set the IP address to 10.0.nn.nn (we have no DHCP server)
(c) Enable the C drive to be shared by everyone (I think I can figure this out, but if
someone has a code snippet it will save me some time)

The point here is to be able to reghost an entire lab (yes, they have legitimate licenses
to support these machines) after each class finishes using the machines, and in a
reasonable time. (I'm involved in some volunteer efforts, and it looks like we can get
access to a set of machines but only if we can reset the machines completely to the
original configurations)
					joe

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
7/29/2003 6:11:53 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
816 Views

Similar Articles

[PageSpeed] 9

Change Ip Adress

1. Open registry on the HKEY_LOCAL_MACHINE

2. Find the subKey = SOFTWARE\Microsoft\Windows
NT\CurrentVersion\NetworkCards\"netcard# "

"netcard# " usually is "1" but you can control any subkey and find specific
netwrok Adapters

Refer to "MSDN Registry Entries for Network Adapter Cards"

3. Get data for the value "ServiceName"

4. Find the subKey =
SYSTEM\CurrentControlSet\Services\"ServiceName"\Parameters\TcpIp"

5. Set data for the value "IpAddress" to change IP address

6. Set data for the value "SubnetMask" to change subnet mask

7. Set data for the value "DefaultGateway" to change default gateway

8. Reboot your PC.


 set local machine HostName

Follow this steps :

1. Open registry on the HKEY_LOCAL_MACHINE

2. Find the subKey = SYSTEM\CurrentControlSet\Services\TcpIp\Parameters

3. Set data for the value "HostName"

4. Find the subKey =
SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName

5. Set data for the value "ComputerName"

6. Reboot your PC and HostName will be set.



NetShareAdd seems to be the most logical API call to share the C Drive.

"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
news:ml3civ4qr9qtuu985ivokba2222qscbfdp@4ax.com...
> Quick question: I need to change the machine name programmatically. I
wasn't able to spot
> the API call quickly, and hoped that someone might have the answer.
>
> Why? We're ghosting 20-30 machines at once from the same master, and need
to run a program
> that will
>
> (a) Set the machine name (it will prompt, and the names are of the form
XXXXnnnn where
> nnnn is a 4-digit number)
> (b) Set the IP address to 10.0.nn.nn (we have no DHCP server)
> (c) Enable the C drive to be shared by everyone (I think I can figure this
out, but if
> someone has a code snippet it will save me some time)
>
> The point here is to be able to reghost an entire lab (yes, they have
legitimate licenses
> to support these machines) after each class finishes using the machines,
and in a
> reasonable time. (I'm involved in some volunteer efforts, and it looks
like we can get
> access to a set of machines but only if we can reset the machines
completely to the
> original configurations)
> joe
>
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm


0
schanna (2)
7/29/2003 7:03:12 AM
Much thanks!
				joe

On Tue, 29 Jul 2003 03:03:12 -0400, "Steve" <schanna@columbus.rr.com> wrote:

>
>Change Ip Adress
>
>1. Open registry on the HKEY_LOCAL_MACHINE
>
>2. Find the subKey = SOFTWARE\Microsoft\Windows
>NT\CurrentVersion\NetworkCards\"netcard# "
>
>"netcard# " usually is "1" but you can control any subkey and find specific
>netwrok Adapters
>
>Refer to "MSDN Registry Entries for Network Adapter Cards"
>
>3. Get data for the value "ServiceName"
>
>4. Find the subKey =
>SYSTEM\CurrentControlSet\Services\"ServiceName"\Parameters\TcpIp"
>
>5. Set data for the value "IpAddress" to change IP address
>
>6. Set data for the value "SubnetMask" to change subnet mask
>
>7. Set data for the value "DefaultGateway" to change default gateway
>
>8. Reboot your PC.
>
>
> set local machine HostName
>
>Follow this steps :
>
>1. Open registry on the HKEY_LOCAL_MACHINE
>
>2. Find the subKey = SYSTEM\CurrentControlSet\Services\TcpIp\Parameters
>
>3. Set data for the value "HostName"
>
>4. Find the subKey =
>SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName
>
>5. Set data for the value "ComputerName"
>
>6. Reboot your PC and HostName will be set.
>
>
>
>NetShareAdd seems to be the most logical API call to share the C Drive.
>
>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
>news:ml3civ4qr9qtuu985ivokba2222qscbfdp@4ax.com...
>> Quick question: I need to change the machine name programmatically. I
>wasn't able to spot
>> the API call quickly, and hoped that someone might have the answer.
>>
>> Why? We're ghosting 20-30 machines at once from the same master, and need
>to run a program
>> that will
>>
>> (a) Set the machine name (it will prompt, and the names are of the form
>XXXXnnnn where
>> nnnn is a 4-digit number)
>> (b) Set the IP address to 10.0.nn.nn (we have no DHCP server)
>> (c) Enable the C drive to be shared by everyone (I think I can figure this
>out, but if
>> someone has a code snippet it will save me some time)
>>
>> The point here is to be able to reghost an entire lab (yes, they have
>legitimate licenses
>> to support these machines) after each class finishes using the machines,
>and in a
>> reasonable time. (I'm involved in some volunteer efforts, and it looks
>like we can get
>> access to a set of machines but only if we can reset the machines
>completely to the
>> original configurations)
>> joe
>>
>> Joseph M. Newcomer [MVP]
>> email: newcomer@flounder.com
>> Web: http://www.flounder.com
>> MVP Tips: http://www.flounder.com/mvp_tips.htm
>

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
7/29/2003 8:47:54 PM
Reply:

Similar Artilces:

Paste Special Changes Content
Greetings - I am attempting to copy and link, via Past Special, a group of rows within the same workbook. When I do, all the empty cells are populated with zeros. I am using Windows 200 and Office XP. Thanks in advance, Bill When you paste special|Links, you end up with a formula like: =x99 If x99 is empty, then excel will show a 0. But you can change your formula to look like this: =if(x99="","",x99) (if x99 is empty, then make the cell look empty, else just show what's in x99.) Bill wrote: > > Greetings - I am attempting to copy and link, via Pas...

stack fault error when browsing address book
I have a problem that occurs when browsing the address book "Contacts" that results in the error message: OUTLOOK has caused a stack fault in MSPST32.DLL and the termination of Outlook I've updated the Win98Se and the Office 2000, tried the steps in the KB218853, and searched the newsgroup and KB to no avail. Also tried the Inbox repair tool (scanpst.exe) which found only minor problems and repaired them. I can look at the entire "Contacts" folder in Outlook without problems. This does not appear to be related to any contact record. Thanks Steve ...

format changes when copying from one cell to another
I'm sure this is simple, but it is not clear to me... I am copying the contents of a group of cells that exist on one worksheet to another. In Sheet2, I tell cell A1 that it should equal Sheet1's A1 value. That works fine. But if the cell is blank on Sheet1, it comes up as "0" on Sheet2. I figured it was probably assuming numeric formatting, but when I right-click > format cell on both Sheet1 and Sheet2, both show up as "general", so why would Sheet2 take a blank value and populate it with "0" ?? I gather than you are putting a formula in one...

How to shift address listings from row list to columns?
I have a mailing list with name, address, city, state & zip with each item in individual rows like a list of labels and a few empty rows of space between each listing. How do I create/transfer this list into columns accross so I can sort by city or zip? Thank you! If your data is nicely grouped, with each group in 5 lines, viz: name add city state zip then an earlier suggestion given which worked might be worth a try: See: http://tinyurl.com/wgcb -- hth Max ----------------------------------------- Please reply in newsgroup Use xdemechanik <at>yahoo<dot>com for email --...

How to change .pst file location on hard drive(s)?
I want to move my .PST file c/w archives to a partition other than C:\. How can I do this with Win Live Mail? Thanks, John. "Machinist60" <e_john_wilson.no.spam.@hotmail.com> wrote in message news:hj5s5l$q8r$1@news.eternal-september.org... > I want to move my .PST file c/w archives to a partition other than C:\. > How can I do this with Win Live Mail? > > Thanks, John. I didn't realize WLM utilized the .pst file. I had to convert my .pst file data into the Windows Mail format and then import the data into WLM. Please explain what you...

Transferring Field from Existing Table/limitations and change of d
Thank you in advance for your help! I have two Excel spreadsheets that I successfully imported into Access 2003 and created tables for. I need to add the field from one table to the other, but there is not a direct match in the relationship. The large table uses the Employee ID as the primary key. The smaller table contains one field that lists a subset of these Employee ID numbers (a selection of certain employees). I need to transfer this field to the larger table, but I do not know how to tell Access to match up the corresponding numbers (i.e., the large table lists all employees, bu...

no change pivot item.
i want to can not change pivotitems in the pivotfields. namely pivotitems restircted. How can I do in VBA? *** Sent via Developersdex http://www.developersdex.com *** ...

Data changes when Analyzed with Excel
I have a query with 3 tables that represent master item list, count qty and as qty. When I look at the results in Query, all is well and accurate yet when I select Analyze with Excel, values change. For example, if a record shows zero qty in the as of field and zero quantity in the count field, I get a value in one or both of the fields that origianlly were zero. Other than linking the tables and grouping by master item list (to show all parts regardless of qty's), there are no formulas or expressions in this query. One of the tables is linked to a FoxPro table via ODBC driver. ...

Change Source Campaign on Invoice and Order
I need to change the Source Campaign on an Invoice and an Order but the field is locked. I tried to enable the field on the form but still cannot make changes. Any ideas beyond direct edit of DB? ...

Contact list not recognized as an address book in outlook email
I installed Outlook 2007 on my computer and imported my addresses from my other computer's Outlook file with excel. The contact list shows all the addresses but I can not access the contact list when I try to send an email. The address book drop down menu does not show anything. I tried to do the "properties" on the contact file, selected the tab "Outlook Address Book" and I am not allowed to check the box to "Show this folder as an address book". I am hoping someone can help me get this resolved. Thank you in advance If you have Contacts in...

How do I export, then import my address book(contacts)
I want to share my Outlook 2003 contacts and groups with my husband's Outlook 2003 I would like to export my contacts and groups to his computer. Then I would like for him to be able to merge my contacts and groups with his already existing contacts and groups. How can I accomplish this? I have a friend who wants to do the same with Outlook 2002? Would the procedure be the same for both versions? Please give steps, I am not very computer literate. Thank you so much. Export your Contacts folder in PST format via File | Import and Export | Export to a file ... Then, copy them ...

Excel 2000/Change Default Opening Location?
I'm using Excel 2000. When I open Excel, and the click on the Open button to open worksheet, it goes to a default location I'd like to change. How can I change that default location? I have searched under Tools > Options, but find no means there. Thanks. -- ---------- CWLee Former slayer of dragons; practice now limited to sacred cows. Believing we should hire for quality, not quotas, and promote for performance, not preferences. Tools|Options|General Tab change the entry in the Default File Location box CWLee wrote: > > I'm using Excel 2000. When I open...

Re: Recovery from EX2000 to EX2003 Server on a new machine
Hi, i have been having serious problems with my current Exchange 2000 machine where it continously fails to load the Information store and other services at startup. i have got it up and running now but if i reboot it will fail again and only starts 1 in 10 reboots What i would like to do it create another box with Windows 2003 and Exchange 2003 and move all the stores,logs and all to this new server. Is there any procedures that need to be followed to do this? and are there any complications with the AD please advise me on the correct was to do this or any documentation there is available...

POP server always changes to localhost
Hello, My outlook is having a wierd issue. I have three POP3 accounts set up to check email in Outlook. After some point in time, all three will stop functioning because in the E-mail accounts settings dialog my incoming mail server will get changed to localhost, and it fails to log in to box to pull my mail. It appends the POP3 server name to my user name which seems odd. So, to summarize, my Incoming mail server (POP3) field changes from it's usual value (something like mail.server.com) to localhost, and my mail server gets appended to my user name (something like username...

How to transfer Custom Views to another machine
Outlook 2003 How do you transfer Custom Views to another machine (no exchange server)? Thank you for your help. They are contained within your pst-file so if you transfer that you'll transfer the views too. -- Robert Sparnaaij [MVP-Outlook] Coauthor, Configuring Microsoft Outlook 2003 http://www.howto-outlook.com/ Outlook FAQ, HowTo, Downloads, Add-Ins and more ----- "John" <no.email@no.email.com> wrote in message news:usDhjJ7hHHA.4132@TK2MSFTNGP05.phx.gbl... > Outlook 2003 > > How do you transfer Custom Views to another machine (no exchange server)? >...

File Naming for Picture Order
I want my photos within a folder to appear in a certain order and want them in numberical order; however, when I put them in numerical order and get past 9 (into 2 digit numbers) the order gets all whacky. bjackson wrote: > I want my photos within a folder to appear in a certain order and > want them in numberical order; however, when I put them in numerical > order and get past 9 (into 2 digit numbers) the order gets all whacky. ======================= Instead of... 1, 2, 3,.....10, 11, 12... Try this... 0001, 0002, 0003,.....0010, 0011, 0012 If you are batch renumbering the f...

Move a particular named sheet to the end.
Using macros, how can I move a sheet called TOTAL to become the very last sheet within a workbook? Your assistance will be appreciated. -- Thank U and Regards Ann Try this: Worksheets("Total").Move after:=Worksheets(Worksheets.Count) "Ann" wrote: > Using macros, how can I move a sheet called TOTAL to become the very last > sheet within a workbook? > > Your assistance will be appreciated. > > -- > Thank U and Regards > > Ann > Barb, Works a treat, thank you for your assiatance. -- Thank U and Regards Ann "Barb Reinhar...

Outlook Express address bk. from Mac to Outlook PC ?? Help
I am trying to export the address bk from my Outlook Express (Mac OS 9.2) to a form that my Outlook PC (Windows XP) can read and use. Any thoughts on what procedure to follow. When I export from the Mac it just saves it as a "Simple text" file - no much good for what I want to do. Any thoughts??? ...

Displaying Sheet Tabs Names in Cells
Can anyone tell me if there is a way for me to display the Name of a Sheet Tab in a cell. Take for example I have 4 worksheets, labelled Shawn, Kevin, Mary, & Data. In data, I want it to show the name of the worksheets. So in Cell A4 I would like it to say Shawn, then in B4 I can put Shawn's data in. Is there a function or a formula that allows me to do this. Thanks for any help. Hi Maybe this UDF will do for you. ------ Public Function TabI(TabIndex As Integer) As String Application.Volatile TabI = Sheets(TabIndex).Name End Function ------ Insert the function in...

help with Excel Chart, Series name
Hello, I am using ORACLE OLE2 package to print a series bar graph in excel. I need to rename "Series Name" that comes out in as a char in excel. By defual the series are names as Series1, Series2, Series3,.....SeriesN. How can I access the handle to "Series Name" which help me change its name. Any help will be highly appreciated. Thanks you, Bilal Bilal, Manally, you do this with Chart - Source data - Series tab. There's a series name box. Select the series to be edited in the drop-down at the left first. It may have a cell reference currently in it, or you can...

Address Auto Complete
A user of mine is looking for a way to get rid of the address auto complete in his TO: field. Any suggestions? Hi! anonymous@discussions.microsoft.com ha scritto: > A user of mine is looking for a way to get rid of the > address auto complete in his TO: field. Any suggestions? What is the problem? You want only to disable it? Which version of Outlook do you use? Bye Roberto -- Roberto Restelli Microsoft MVP - Office Systems - Outlook We are running Outlook 2002. He wants to disable the feature that automatically suggests an email address from his Contacts list. Ex. when he t...

Recipient Address Popup
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: imap How can I disable the popup for entering to, bc, bcc fields? I would rather just have the fields there in the new email window without any popup. ...

Change bars color
Hello, I have a dinamic chart to show the cash flow position, a scrool bar chagne the data to the past and to the future (estimate), what I am looking for is, to have an easy identification of the estimated period I would like to chage the color of the bar. I am using an Stacked Column chart with two variables. any Ideias? -- regards from Brazil Thanks in advance for your feedback. Marcelo What I usually do when I want to show a column chart with one color within a certain range and another color elsewhere, is create two series, one each color, and use formulas to change on series ...

Auditing form on record change
HI, I have a form with multiple fields that I want to track changes to. I was able to create a auditing trail when users click on particular buttons however if they dont click on the buttons the auditing does not occur. What I am wanting to do is to run the audit when a user changes to a new record. I have tried the "on current" and "before update" but they didnt work. Any suggestions? Take a look at what Allen Browne has at http://www.allenbrowne.com/AppAudit.html -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "...

Opens to Personel Folder by default...How to Change?
I cant seem to find a setting anywhere that will let me change Outlook 2003 to open right up to the Inbox. It keeps going to the Personel Folder....Even right after a clean install....Anyone I know that uses Outlook never had to set anything and it always went straight to the Inbox. Any one know how to change this?? THANKS! Darren, Outlook toolbar: Tools/Options/Further/extended options/Folder with program start Do you search this setting? -- Oliver Vukovics Outlook Network without exchange: Public OutLook Share your Outlook PST with several users! http://www.outlookstore.com &...