Skip to content Skip to main navigation Skip to footer

Using a Static IP in TBWinPE/RE

This article provides instructions on specifying a static IP address in TBWinPE/RE. This is useful when connecting to a network without a DHCP server or other cases when a specific address is required. The process can be done manually after booting or it can be configured to run automatically as part of initialization.

Manually set static IP

  1. Boot to TBWinPE/RE.

  2. Open a Command Prompt.

  3. Determine the appropriate interface name used by running one of the following commands:
    netsh interface ip show addresses
    netsh interface ip show interfaces
    ipconfig

    Common interface names include Local Area Connection, Ethernet, and Ethernet0.

  4. Run the following command to set a static address. This example uses Ethernet0 for the interface name, an address of 192.168.0.252, subnet mask of 255.255.255.0, and a gateway of 192.168.0.1. (Command should all be on one line.)
    netsh interface ip set address "Ethernet0" static 192.168.0.252 255.255.255.0 192.168.0.1

    Help and examples are available by running:
    netsh interface ip set address /?

  5. If necessary, DNS addresses can also be added. (Commands should each be on one line line.)

    netsh interface ip add dnsservers "Ethernet0" 192.168.0.25 index=1

    netsh interface ip add dnsservers "Ethernet0" 192.168.0.26 index=2

  6. The address change should take affect within a few seconds.

 

Set static IP during initialization

If you would like the commands to run automatically as part of the TBWinPE/RE initialization you can add them to InitScript.cmd when creating the build.

  1. Determine the appropriate interface name (see steps 1 through 3 in the above manual instructions).

  2. Run TBWinPE/RE Builder.

  3. Go into Settings and click the Scripts tab.

  4. Check the Include InitScript.cmd option and then click the Edit link. The script will open in Notepad.

  5. Add the commands to the end of the file (these will be the commands you would run in steps 4 and 5 in the above manual instructions). Save the file and exit Notepad when finished.

  6. Back in TBWinPE/RE Builder Settings, click the TBLauncher tab.

  7. Make sure the Run network initialization option is checked.

  8. Make sure the Run initialization programs in background option is unchecked (this is necessary so that network initialization can complete prior to InitScript.cmd being run).

  9. Click OK to close Settings.

  10. Continue creating the TBWinPE/RE build.

 

Was This Article Helpful?

0