Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Assign Static IP

Featured Replies

I cant believe someone else hasnt asked this before, but I search for 'static IP' and came up with nothing...

How does one assign a static IP and network info to a PC UA style?

Thanks!

You should be able to configure it as a part of the WINNT.SIF file. I'm not at all familiar with this particular portion of the file, but here is my best-guess effort at how to set it up. I make no guarantees that this will work.

[Networking]
   InstallDefaultComponents=No

[NetAdapters]
   Adapter1=params.Adapter1

[params.Adapter1]
   INFID=*

[NetProtocols]
   MS_TCPIP=params.MS_TCPIP

[params.MS_TCPIP]
AdapterSections = params.MS_TCPIP.Adapter1


[params.MS_TCPIP.Adapter1]
   SpecificTo=Adapter1
   DHCP=No
   IPAddress = 1.1.1.1
   SubnetMask = 255.255.248.0
   DefaultGateway = 2.2.2.2
   DNSServerSearchOrder = 193.1.1.3,193.1.1.44
   WINS = No

Of course, this code isn't meant to be used as-is, but substitute in the values you want for the dummy IPs that are listed and it should set you up with a nice, shiny static IP.

You can easily do this in your winnt.sif - read the helpfile ref.chm

"Easy" is relative. I pieced together the above code from the helpfile combined with astalavista's sif that he has posted in another thread. I figure I'm doing well to understand about 1 line in 3. :P

  • Author

Sweet... didnt even think to look there.

Thanks as always gentlemen.

What about dns servers?

Or is that what DNSServerSearchOrder is?

I tried it here but for some reason if thats it, its not setting it correctly.

What about dns servers?

  DNSServerSearchOrder = 193.1.1.3,193.1.1.44

Pretty sure that's what this line is all about.

i personally use this batch after install (more flexible for different pc's)

@echo off

:NW_CHOOSE

ECHO.

ECHO 1. STATIC

ECHO 2. DHCP

ECHO 3. Cancel

SET /P NW_CONF=[Do you want to use DHCP or specify a static IP? (Select 1 or 2)]

IF /I "%NW_CONF%" == "1" GOTO NW_INPUT

IF /I "%NW_CONF%" == "2" GOTO NW_SET_DHCP

IF /I "%NW_CONF%" == "3" GOTO END

:NW_INPUT

SET /P STATIC_IP=[iP:]

SET /P SUBNET=[subnet Mask:]

SET /P GATEWAY=[Default Gateway:]

SET /P DNS=[DNS Server:]

ECHO.

ECHO You specified:

ECHO IP Address: %STATIC_IP%

ECHO Subnet Mask: %SUBNET%

ECHO Default Gateway: %GATEWAY%

ECHO DNS Server: %DNS%

:NW_CONFIRM

ECHO.

SET /P NW_CONF=[is this correct? Y/N:]

IF /I "%NW_CONF%" == "Y" GOTO NW_SET_STATIC

IF /I "%NW_CONF%" == "N" GOTO NW_INPUT

GOTO NW_CONFIRM

:NW_SET_STATIC

netsh int ip add address "Local Area Connection" %STATIC_IP% %SUBNET%

netsh int ip add address "Local Area Connection" gateway=%GATEWAY% gwmetric=1

netsh int ip add dns "Local Area Connection" %DNS%

GOTO END

:NW_SET_DHCP

netsh int ip set add "Local Area Connection" dhcp

GOTO END

:END

will set ip, subnet, gateway and dns.

no problem, also use this for naming afterwards. i just have both copied to the desktop and run them after full install.

@echo off

:NW_CHOOSE

ECHO.

SET /P NW_CONF=[Do you want to change the computer name Y/N:]

IF /I "%NW_CONF%" == "Y" GOTO NW_INPUT

IF /I "%NW_CONF%" == "N" GOTO END

:NW_INPUT

SET /P NAME=[NAME:]

ECHO.

ECHO You specified:

ECHO NAME: %NAME%

:NW_CONFIRM

ECHO.

SET /P NW_CONF=[is this correct? Y/N:]

IF /I "%NW_CONF%" == "Y" GOTO NW_SET_NAME

IF /I "%NW_CONF%" == "N" GOTO NW_INPUT

GOTO NW_CONFIRM

:NW_SET_NAME

compname.exe /c %NAME%

GOTO END

:END

you will also need the attached file: compname.exe (put in system32 under $oem$ )

compname.rar

:NW_SET_STATIC

netsh int ip add address "Local Area Connection" %STATIC_IP% %SUBNET%

netsh int ip add address "Local Area Connection" gateway=%GATEWAY% gwmetric=1

netsh int ip add dns "Local Area Connection" %DNS%

GOTO END

dnrc, I see your script sets the gateway separately from the ip and mask. I also, noticed that you cannot set them at the same time although the commandline help indicates that you can in one of the examples.

I thought I would just point this out in case people didn't just copy your script verbatim and tried to use the example from NETSH.EXE.

HTH

yep that's exactly what i found. the help says you can but it doesn't work so i split it over two lines.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.