outPutCSV() doesn't spawn a thread, It extracts some RCDATA, accesses the registry, saves to a CSV file and that's it.
I'm not sure if I've managed to get my point across. Consider the following:
From a cmd prompt, I run calc. The calc.exe process runs, and I can interact with it. Yet, the command prompt has returned. If calc.exe were a console app, the prompt would not be usable until main() from calc.exe returns.
I want to achieve console app behavior with my Windows app, but only when command line params are passed.
No other windows are created.