Set a current working directory for generated exe
The Force CWD function is disabled by default. Use a configure item 'forcecwd' to specify a relative or absolute path to enable Force CWD function.
Generate exe will change current directory to the directory specified before it begins to run.
If the 'forcecwd' is followed by a relative path, the path is based on the exe file's position. For example: if your generated exe is "D:\Folder\Program.exe", then
is to set current directory to "D:\Folder\" regardless the directory where you start it.
Another example, if your generated exe is "/usr/folder/appdir/bin/program", then
is to set current directory to "/usr/folder/appdir/", then if the program write a file with relative path "logs/msg.log", the file will be in the directory "/usr/folder/appdir/logs/".
About Service Type
For Service type of generated exe, if there is no 'forcecwd' in its configuration file, "forcecwd ." is used by default.
- See Run as Service page for more information about Service type of application.