maphew

Doskey (CMD Aliases)

October 16, 2023

# make a shorter-to-type copy available
doskey mm="C:\apps\micromamba\condabin\micromamba.bat" $*

reg add "hkcu\Software\Microsoft\Command Processor" /v AutoRun /d "(C:\apps\micromamba\condabin\mamba_hook.bat) & (doskey /macrofile=c:\bin\aliases_doskey.txt)"

The AutoRun value is the command line to run. You could simply append another command using the & operator.

Result:

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"AutoRun"="(\"C:\\apps\\micromamba\\condabin\\mamba_hook.bat\") & (doskey /macrofile=c:\\bin\\aliases_doskey.txt)"

From < https://stackoverflow.com/questions/29342150/how-to-add-several-values-for-a-single-key-in-windows-registry>

Doskey aliases file:

https://github.com/maphew/mhwcode/blob/master/other/aliases_doskey.txt