forcecwd

Set a current working directory for generated exe


Introduction

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.


Relative Path

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

forcecwd .

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

forcecwd ..

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.

Comments

db with java

I have a programe that I am trying to convert to exe using your product.  But it has a DB - Derby with it.  How can or should I include that in the exe??  Is it just a matter of including a new path??

Add new comment