AutoRun is a hidden gotcha of the command processor
which lets you set a registry key to inject a command
into every command prompt as soon as it starts up.
And I'm guessing that there's a rogue AutoRun entry
that is doing something which is generating that message.

You can do some pretty neat things with your own autorun script. I have one that hooks the drive letter changes and cd/chdir/pushd/popd commands with doskey. Whenever I change directory, I update the title of the window to reflect it.

Of course, such scripts need to be created carefully. Any app that tries to funnel commands through cmd.exe will end up invoking this script, so it could break things if it changes something like the working directory.

I actually had to stop using doskey to create aliases because doskey in AutoRuns sometimes crashes when cmd.exe is started by some 3rd-party apps. Probably because stdin was not hooked up or a strange stdout pipe? This was back in the XP/Vista days so it might be fixed by now. I must have reported it hundreds of times over the years with Dr. Watson before I gave up and wrote my own alias.exe helper.

I remember one time years ago when I was madly troubleshooting a database update script, running through the command line, that failed only on my machine. The culprit was an AutoRuns key that I had set years earlier and had long since faded from my memory. Boy, was I embarrassed when I had to recall that bug report…

Sounds to me like a security issue !
A non-admin program can quietly set HKCU\Software\Microsoft\Command Processor\Autorun to run malware
And next time you open a cmd.exe with admin rights, the malware command gets executed

It doesn’t look like it.
For example, from a normal command prompt I tested: reg add “HKCU\Software\Microsoft\Command Processor” /v AutoRun /d “regedit”
When I open a new normal cmd.exe, it starts and I get also prompted to run regedit with admin rights (that’s expected)
When I open an admin cmd.exe (From start menu “cmd” + Ctrl-Shift-Enter), I get prompted to run cmd with admin rights (that’s expected), and then regedit is launched without further prompting.
That means the same HKCU Autorun was used for normal & admin cmd.exe and a malware can setup a sneak attack through this, waiting for the user to open a cmd with admin rights.
IMO, cmd.exe (signed by MS authenticode) should be entrusted to be run safely as admin at any time and not execute commands from HKCU.