During an installation process I need to check if a userprovided path is writable to a specified user.
The Path (A UNC Path like \fileserver\share) may not be writable to the user, who is executing the Setup.exe (It's a Windows-Only Software), so I think How do you check for permissions to write to a directory or file? may not work for me.
I know in Java7 there will be a new Filesystem-API, but Java7 is not released yet.
EDIT: User 1 - runs the installer User 2 - runs the installed application
If user 1 get an error "Permission denied" I still don't know, about user 2. I need to check the permission for an other useraccount during the process of installation.
I may use net use /user:<user2> <passwd2>
but I'm not sure, if I get all information I need. I get the information, that the path exists, but not, if User 2 is allowed to write.