Repository navigation
fix(packaging): make install/uninstall scripts robust - #16
Merged
Merged
Conversation
Resolve RegAsm.exe and the add-in DLL through %~dp0 so registration still works when NoDefaultCurrentDirectoryInExePath disables the implicit current directory search. Replace the parenthesized self-elevation block with label branches so %ARGS% is expanded at execution time instead of parse time; the empty -ArgumentList previously made Start-Process fail validation when the script was launched without arguments. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Found during the end-to-end manual verification in SolidWorks 2025:
install.bat/uninstall.batresolvedRegAsm.exeand the add-in DLL through the current directory, which fails whenNoDefaultCurrentDirectoryInExePathis set. Both now use%~dp0absolute paths.set "ARGS=%*"inside a parenthesized block, so%ARGS%was expanded at parse time andStart-Process -ArgumentList ''failed validation when the script ran without arguments. Replaced with label branches so the variable is expanded at execution time.Verified locally:
install.bat /quietself-elevates through UAC and registers the add-in; the/quietpath suppressespauseand reports through the exit code.Testing
install.bat /quietfromdist/on Windows 11 withNoDefaultCurrentDirectoryInExePath=1; UAC prompt raised, RegAsm registration succeeded, SolidWorks loaded the add-in (Vulcan AIribbon tab present).🤖 Generated with Claude Code