Search code examples
c++windowswindows-installerconsole-applicationsoftware-distribution

How to make my CPP console app installable/redistributable which depends on some external files?


I am new to this coding world. So forgive me if any dumb question is asked or I made any mistakes

I am making a cpp tool which works well on my machine & also on others too. But inside it there is a function which works with some BAT & VBS files stored in a separate folder. Now the problem is when I am sharing the EXE file it is not working as the folder directory can not be found on other devices.

Now how can i solve this scenario? Is there a way to make installer for the console app which will copy the necessary files and folders in to the user's C drive? Or can I include the files into the EXE and extract them to a folder so the the program can use those?

Is there any possible solution for this ?

I am using Visual Studio Code & mingw gcc compiler for building the app


Solution

  • How about creating installer using setup creator(https://installforge.net). You can package multiple files in the installer and select installation directory to something like c:/program files/your_application_name. That way your executable and other files will be in the same folder and it will also create a start menu shortcut