The links you provided show how to do it.
I have my doskey macros in a file aliases.txt
in my folder %USERPROFILE%
11:24:16 C:\Users\LotPings________________________________________
> type Aliases.txt
~=CD /D "C:\Users\LotPings"
\=CD \
-=CD ..
Alias=Doskey $*
Aliases=Doskey /MACROS:ALL
And an autorun entry which loads this file
> reg query "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v autorun
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
autorun REG_SZ Doskey /MacroFile="C:\Users\LotPings\Aliases.txt"
To generate this Autorun automatically copy the following lines into cmd line or a batch file
Set "Key=HKEY_CURRENT_USER\Software\Microsoft\Command Processor"
Set "Val=Autorun"
Set "Typ=REG_SZ"
Set "Dat=Doskey /Macrofile=\"%USERPROFILE%\Aliases.txt\""
reg add "%Key%" /v %Val% /t %Typ% /d "%Dat%" /f