Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make installer to point sudo.exe symlink at Current directory #391

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

@@ -30,9 +30,9 @@

<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.

@@ -112,12 +112,12 @@
</Fragment>

<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