Get executing directory in C++ -


I have a .cb file that runs on the Windows CE box as part of the installer process. Has been written in

As part of the upgrade process, the CAB file runs twice, but at different locations at different times Which directory is the CAB file using the C ++ file (executing the directory)?

Thanks

If "C ++ only" means you mean Without using the Windows API, I do not think the Standard Library has to do this.

If you can call the Win32 API, you must call GetModuleFileName () with the tap as the first code, and you will receive the path of the present executable.

Now, the problem is: do you run CAB, what is executable? CAB, or DLL to be withdrawn from shell components, is running the CAB?

You can also try GetCommandLine () , because the first entry should be executable path / name (it actually sent to CreateProcess () Gone string, so you can not make sure about it 100%).


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -