Further to my post above, I have now tracked down the issue.
It wasn't any kind of system problem, but rather just something specific to the way that I was using the commands on my main system compared to what I did differently when using the virtual machine.
The purpose of me creating these macros is so that I can automatically use them whenever I open a command console. I therefore created a batch file, put all my macros in there, and then set it to run automatically when I start cmd.exe. I did this by appending the /k switch and path to the batch file containing my macros in the target box of the shortcut that I use to launch the command console. And this is where the problem lies.
When I did my test on the virtual machine it was a clean install, and so it did not have a copy of my batch file loaded by the command console. I therefore had to manually paste the commands into the console window in order to test them, whereas when I tested on my main system these commands were already listed in my startup batch file, and so I expected them to be already loaded and ready to use. This is why it worked in the virtual machine but not on my main system (even though I was using the exact same commands on both).
So I went back to my main system and manually pasted in the two commands shown below, and everything worked perfectly (for the duration of that session). But obviously once I closed and reopened the cmd console window then those manually typed commands were no longer available.
You saw the simplified batch file that I was using (I pasted it into a previous post). It contained the following two commands, and these seem to be the only two commands that don't work properly when they are loaded from a batch file.
Code: Select all
set regwork="C:\Program Files\Registry Workshop\RegWorkshopX64.exe"
doskey su=psexec -s -i %$*%
So the problem is how to get these command to work when they are loaded a batch file without me having to physically paste them into the window for every command console session.
Presumably you were also typing the commands live into the window. Are you able to get these commands to work when they are run from a startup batch file?