Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
3.1.1
-
None
Description
For a component, adding operation 'CreateLink' with the argument 'linkPath' pointing to a folder under some system directory, for example "C:\Program Files", "C:\Program Files (x86)" and "C:\Windows" does not produce a working directory junction on Windows.
Running an example installer with --verbose parameter shows two warnings inside CreateLink operation section in output (with double backslashes in the paths):
Warning: Cannot open "C:\Program Files\InstallDir\testlink" : "Access is denied.\r\n (0x00000005)"
Warning: Cannot open "C:\Program Files\InstallDir\testlink" : "The operation completed successfully.\r\n (0x00000000)"
It does not seem to matter if the 'linkPath' points under installation target directory or not, as long as it is under a system directory. It also does not matter if the component defines '<RequiresAdminRights>true</RequiresAdminRights>' in its package.xml or if the operation is created with 'component.addElevatedOperation()' in component install script.