Why do you need to code this? Why can't you just create it normally?

Are you trying to write an installer program or something? C++ is not meant for that and I don't think anyone does that. ...