- install Notion executables in user path
- install Notion files in user profile
- install Notion registry settings in HKCU
- Notion command is a pair of
.cmd
and.ps1
wrapper scriptscmd.exe
sees the.cmd
script- PowerShell sees the
.ps1
script
- Both
.cmd
and.ps1
scripts run in-process and can mutate console's environment - Exit script
- Boot sequence creates temp path for a "exit script"
- Boot sequence passes exit script's path to the Notion executable
- Notion executable optionally puts source into the exit script
- Wrapper script executes the script to perform environment mutations on behalf of Notion
- Installation detects presence of System Node
- If a System Node exists:
- Add a Notion
cmd.exe
autorun script toHKCU\Software\Microsoft\Command Processor\AutoRun
- Create the reg key if it doesn't exist
- If it does exist,
&&
it with the existing command - AutoRun script should ensure it's only run once per process with an up-front flag
- Script prepends Notion path entries to front of
%Path%
- Add a Notion PowerShell profile that does similarly
- Add a Notion