Skip to content

chore: change nsis script to use global cmd.exe @W-19315214@#2365

Merged
shetzel merged 7 commits into
mainfrom
wr/winInstallerCmdExe
Sep 5, 2025
Merged

chore: change nsis script to use global cmd.exe @W-19315214@#2365
shetzel merged 7 commits into
mainfrom
wr/winInstallerCmdExe

Conversation

@WillieRuemmele
Copy link
Copy Markdown
Contributor

@WillieRuemmele WillieRuemmele commented Aug 28, 2025

What does this PR do?

changes the custom nsis used in sf for checking for installed sfdx CLI to use the global cmd.exe instead of a local, possibly malicious cmd.exe file

Acceptance Criteria

Testing Notes

oh boi - needs a windows machine
needs oclif/oclif#1852

setup:
(I had to delete the JIT section in pjson in CLI for some steps to work locally)

  1. be on windows
  2. checkout the oclif PR / yarn / yarn build
  3. checkout this PR / yarn /
  4. run oclif pack:tarballs --xz --parallel --prune-lockfiles --targets win32-x64 or whatever windows target you need (just builds one, instead of every, installer)
  5. ../path/to/oclif/bin/run.js pack:win --prune-lockfiles --targets win32-x64 --defender-exclusion unchecked
  6. If step 6 fails, there's a good chance it was at least able to build the .nsi file. I believe this file is in the output, and it's in tmp/. You can makensis path/to/.nsi which will compile your .nsi into a .exe, you can then drag that .exe into your testing folder
  7. drag the new built installer from dist/ to your directory with a "malicious" cmd.exe program in it and install

Notes:
sometimes the pack:win command would fail, but I'd still get the required sf.nsi file, which then I'd have to run makensis path/to/sf.nsi which would build the installer

Checklist

  • This change has been approved by the CLI Review Board or approval isn't required. Anything that adds/changes/deletes commands, flags, output, or json output has to be reviewed.
  • Does this follow the deprecation policy?

What issues does this PR fix or reference?

@W-19315214@

@shetzel shetzel merged commit 8f7f6f6 into main Sep 5, 2025
31 checks passed
@shetzel shetzel deleted the wr/winInstallerCmdExe branch September 5, 2025 22:24
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.

2 participants