How to connect two computers without LAN or internet ?

  1. PC1 : Run command 1 to create Hotspot.
  2. PC1 : Run command 2 to start Hotspot.
  3. PC2 : Connect the PC1's hotspot.
  4. PC1 : Set IP to 192.168.1.1 and subnet to 255.255.255.0.
  5. PC2 : Set IP to 192.168.1.2 and subnet to 255.255.255.0.
  6. Open Manage advanced sharing settings.
  7. Change the two computers by settings below.


Command 1

C:\Users\USER-PC>netsh wlan set hostednetwork mode=allow ssid=HotspotName key=Password


Command 2

C:\Users\USER-PC>netsh wlan start hostednetwork


Settings

Turn on network discovery
Turn on file and printer sharing
Turn on public folder sharing
Use 128-bit encryption to help protect file sharing connections
Turn off password protected sharing

Click Save changes after change the settings.