First of all make sure that you are underweight. You may consult your doctor and ask him whether you are normal weight or slightly less, but within permissible range or really underweight. Then get his suggestion to increase weight to the needed normal level, if needed.
Naturally also you are bound to put on weight gradually. So unless you are much below the normal average weight-height-age relativity, any crash action to increase weight may lead to counter productive results. If your parents and grandparents are by nature underweight, then that hereditary trait can be seen in you also. Just underweight may not mean that you are unhealthy.
Weight can be increased by consuming more proteinous foods. Carbohydrate consumption also can lead to weight increase. It is better to avoid supplements (like the one mentioned in the question). It is suggested to take home made foods with more protein and carbohydrates. Then, monitoring the rate of increase you may adjust the quantum consumed. However please bear in mind that you should also engage in physical activity, to avoid unnecessary fat accumulation.
You may add more proteinous foods like pulses, beans,and the non-vegetarian equivalents to your food intakes. If feeling hungry taking tasty snacks between meals can be useful to increase weight. But please be cautious, because overweight is more problematic and difficult to remedy than being slightly underweight.