I am writing a Java application that writes a number of files, and later reads the files for their values. I am using InstallShield to install the application under C:\Program Files, and this is where the temporary files usually get created. However, when using Windows 7, the files are created under the users temporary folder instead, with a random name.
Here is my code...
File usersTemp = File.createTempFile("users", null,temp);
And this is the file that gets generated...
C:\Users\TP\AppData\Local\Temp\users2343200092608531612.tmp
As the file is generated with a random number, it makes it hard to retrieve the file back for processing. Is there a better way to do this?
usersTemp.getAbsolutePath()and use that string for later?