Skip to content

Conversation

@IDisposable
Copy link

Have the symlink point at the Current junction directory instead of the specific installed folder.

To do this, have to create the junction before the symlink (and upon uninstall do it in the opposite order).

Fixes #390


<InstallExecuteSequence>
<!-- https://stackoverflow.com/a/17608049/97471 -->
<Custom Action="CreateSudoCurrentFolderLink" Before="InstallFinalize" Condition="NOT Installed" />
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have to create the Current junction directory before we create the sudo.exe symlink.

<Fragment>
<CustomAction Id="CreateSudoExeLink" Directory="VERSIONFOLDER" ExeCommand="cmd /c mklink sudo.exe &quot;[VERSIONFOLDER]gsudo.exe&quot;" Execute="deferred" Return="ignore" Impersonate="no" />
<CustomAction Id="RemoveSudoExeLink" Directory="VERSIONFOLDER" ExeCommand="cmd /c DEL sudo.exe" Execute="deferred" Return="ignore" Impersonate="no" />
<CustomAction Id="CreateSudoExeLink" Directory="VERSIONFOLDER" ExeCommand="cmd /c mklink sudo.exe &quot;[INSTALLFOLDER]Current\gsudo.exe&quot;" Execute="deferred" Return="ignore" Impersonate="no" />
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Point the sudo.exe symlink at the install folder's Current junction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Make the sudo.exe symlink point at the Current junction

1 participant