Opening a cmd prompt and manually issuing my custom doskey macro commands works fine, but I figured that I could save time by creating cmd shortcuts that invoke these commands automatically.
So, I created 2 cmd shortcuts that automatically run these doskey macros from the Target fields:
%windir%\system32\cmd.exe /k m7
%windir%\system32\cmd.exe /k m50
Running the shortcuts shows these error messages:
'm5' is not recognized as an internal or external command
'm50' is not recognized as an internal or external command
Regular cmd commands, however, work when specified in the Target field:
%windir%\system32\cmd.exe /k dir
What do I have to do to make it work with a doskey alias command? By the way, I made sure that each shortcut runs as administrator. And all my doskey macros have been loaded into the registry for memory persistence between cmd sessions. Thanks.
The doskey cmd files:
@echo off doskey m7=C:\Bin\m7connect.cmd doskey m50=C:\Bin\m50connect.cmd
@echo off adb disconnect adb connect 192.168.1.7 timeout /t 1 /nobreak scrcpy
@echo off adb disconnect adb connect 192.168.1.8 timeout /t 1 /nobreak scrcpy