I'm working on a batch file, and I need to add this entry:
doskey wfreerdp="C:\Program Files\wfreerdp\wfreerdp.exe" $*
to this regkey:
HKCU\Software\Microsoft\Command Processor
I played with the options of reg add
, but I simply cannot get it to work.
I know it should be something like:
reg add "HKCU\Software\Microsoft\Command Processor" /v doskey wfreerdp = "C:\Program Files\wfreerdp\wfreerdp.exe" $*
but I don't which one and how to use the /t
, /S
, /d
& /f
flags.
If I manually add the entry:
doskey wfreerdp = "C:\Program Files\wfreerdp\wfreerdp.exe" $*
it works perfectly.
Alternativelly I tried creating the C:\bat\macros.doskey
file, containing the doskey command:
doskey wfreerdp = "C:\Program Files\wfreerdp\wfreerdp.exe" $*
and the following in the batch file:
reg add "HKCU\Software\Microsoft\Command Processor" /v Autorun /d "doskey /macrofile=\"c:\bat\macros.doskey\"" /f
No success.
Any tips?