Charging laptop using external 18650 cells
Among others, many HP, Dell and Sony laptops have a third wire with which the laptop identifies that a proper charger was used.

It is often easier to charge the battery directly instead of going through the laptop.