exe4j fails unable creating temp directory (potentially causing Windows error 7)

672 views Asked by At

We use exe4j 4.4.4 to build an exe that runs our Java program. One of our customers is complaining that sometimes they are getting "Windows error 7" when running our exe. This only happens intermittently and only on a couple of machines out of hundreds.

We enabled exe4j debugging and noticed that in cases when we get the error exe4j log file contains several entries like the one below and then ends. However, on successful exe launch the log file goes beyond these entries and eventually launches our Java program.

These are the last several log messages in exe4j log file when we get the error:

GetTempPath returned 14 (last error 183)
make dir returned -1
tempPath is C:\WINNT\TEMP\
tempFile is C:\WINNT\TEMP\e4j38.tmp
Temp dir: C:\WINNT\TEMP\e4j38.tmp_dir
Could not create dir (183)
GetTempPath returned 14 (last error 183)
make dir returned -1
tempPath is C:\WINNT\TEMP\
tempFile is C:\WINNT\TEMP\e4j39.tmp
Temp dir: C:\WINNT\TEMP\e4j39.tmp_dir
Could not create dir (183)
GetTempPath returned 14 (last error 183)
make dir returned -1
tempPath is C:\WINNT\TEMP\
tempFile is C:\WINNT\TEMP\e4j3A.tmp
Temp dir: C:\WINNT\TEMP\e4j3A.tmp_dir
Could not create dir (183)

1

There are 1 answers

0
alecswan On BEST ANSWER

There was a bug in exe4j which caused it to cycle through its temp folders after a bunch application restarts. Exe4j reduced the chance for temp folder collisions in 4.4.5 version by adding a timestamp to the names of their temp folders.