So what I need is to make the installation wizard that will prompt user to enter some values before he installs his product. For example I need to set the COM port so I would need from user to enter the right COM port and I want to pass that value to C#.
Is this possible? Same thing is for the serial key for example. How to make that? Are there any tools? What technology I need to use and so on..So please give me your ideas and experiences.
You can use WiX to create custom dialogs in your setup wizard. (The Setup project in VS does not support it.)
See New Link in the Chain article of WiX tutorial, it addresses adding a new dialog to collect registration information.
Similarly you can add other dialogs to your setup wizard if necessary.