i'm creating symbolic links on Windows using a command like this :
cmd /c mklink /J "${linkName.canonicalPath}" "${targetFolder.canonicalPath}"
From Groovy and using Runtime.getRuntime().exec() method
It's working fine but i want do the same using java.nio.Files.createSymbolicLink() method. But I always obtain the same error message:
java.nio.file.FileSystemException: A required privilege is not held by the client.
The mklink /J command works for the current user and i want avoid elevate privileges
With Windows (W7), you can add a user to the list of who may create symbolic links (without disabling UAC) using security policies.
secpol.msc
Security Settings|Local Policies|User Rights Assignment|Create symbolic links
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With