On two of my Win10 systems, I can swap between Powershell and command prompt. But on the third there's a most peculiar problem.
Settings/Personalisation/Taskbar has the option to switch between the two. When I set it to CMD, CMD appears for a second in a tiny window and then disappears. I can't get it to stay put.
I've run DISM and sfc, have the latest 22H2 19045.5796 build.
Ed
On two of my Win10 systems, I can swap between Powershell and command
prompt. But on the third there's a most peculiar problem. Settings/Personalisation/Taskbar has the option to switch between the
two. When I set it to CMD, CMD appears for a second in a tiny window and
then disappears. I can't get it to stay put.
I've run DISM and sfc, have the latest 22H2 19045.5796 build.
mpcmdrun.exe -scan -scantype 2 > %temp%\mpscan.txt & notepad %temp%\mpscan.txt
VanguardLH wrote:
mpcmdrun.exe -scan -scantype 2 > %temp%\mpscan.txt & notepad
%temp%\mpscan.txt
Thanks for jumping to help.
No sign of CMD in Task Manager, nor in Reliability Monitor.
The shortcut points to the version in system32, which I tried by
clicking on it in situ; same brief flash.
Cmd.exe and cmd.exe/k produce the same phenomenon.
I've run DISM and sfc /scannow again, plus done a full chkdsk c: /f /r.
I'm now running a full Windows Defender scan; fingers crossed.
Ed
VanguardLH wrote:
mpcmdrun.exe -scan -scantype 2 > %temp%\mpscan.txt & notepad %temp%
\mpscan.txt
Thanks for jumping to help.
No sign of CMD in Task Manager, nor in Reliability Monitor.
The shortcut points to the version in system32, which I tried by
clicking on it in situ; same brief flash.
Cmd.exe and cmd.exe/k produce the same phenomenon.
I've run DISM and sfc /scannow again, plus done a full chkdsk c: /f /r.
I'm now running a full Windows Defender scan; fingers crossed.
Ed
Ed Cryer wrote:
VanguardLH wrote:
mpcmdrun.exe -scan -scantype 2 > %temp%\mpscan.txt & notepad %temp%
\mpscan.txt
Thanks for jumping to help.
No sign of CMD in Task Manager, nor in Reliability Monitor.
The shortcut points to the version in system32, which I tried by
clicking on it in situ; same brief flash.
Cmd.exe and cmd.exe/k produce the same phenomenon.
I've run DISM and sfc /scannow again, plus done a full chkdsk c: /f /r.
I'm now running a full Windows Defender scan; fingers crossed.
Ed
Full scan ok. 57 mins. Zero threats found.
No mention of CMD in Event Viewer.
The version of CMD in SysWOW64 has the same disappearing behaviour.
However, I installed Administrator account and it works just fine from
there. And the file location is the same as my user.
I'm pondering whether to run a full system repair - download Win10
latest. But there's no sign of any other problem, and this one seems too minor to warrant such extensive attention. I can use Powershell, and, in
case of necessity, CMD in Administrator account.
Ed
Ed Cryer <ed@somewhere.in.the.uk> wrote:
Ed Cryer wrote:
VanguardLH wrote:
mpcmdrun.exe -scan -scantype 2 > %temp%\mpscan.txt & notepad %temp%
\mpscan.txt
Thanks for jumping to help.
No sign of CMD in Task Manager, nor in Reliability Monitor.
The shortcut points to the version in system32, which I tried by
clicking on it in situ; same brief flash.
Cmd.exe and cmd.exe/k produce the same phenomenon.
I've run DISM and sfc /scannow again, plus done a full chkdsk c: /f /r.
I'm now running a full Windows Defender scan; fingers crossed.
Ed
Full scan ok. 57 mins. Zero threats found.
No mention of CMD in Event Viewer.
The version of CMD in SysWOW64 has the same disappearing behaviour.
However, I installed Administrator account and it works just fine from
there. And the file location is the same as my user.
I'm pondering whether to run a full system repair - download Win10
latest. But there's no sign of any other problem, and this one seems too
minor to warrant such extensive attention. I can use Powershell, and, in
case of necessity, CMD in Administrator account.
Ed
winston mentions there might be a window sizing problem. Possibly the console window is minimized leaving only its Taskbar button.
In addition, after you run cmd.exe, and the window opens and disappears,
is cmd.exe still listed as a running process in Task Manager?
Is there still a Taskbar button for cmd.exe? Or is it the Taskbar
button you see appear and quickly disappear (and never do see the
console window)?
If there is a Taskbar button for cmd.exe's console window, but you don't
see the window, could be it is minimized, or it is offscreen. Click the Taskbar button for cmd.exe to make it the active window, hit
Alt+Spacebar to activate its Control Menu, hit M (to select the Move
menu entry), and use the arrow keys to move the window around. Most
windows still have the Control Menu, but often the "-" at the left end
of the titlebar is not shown. Alternatively, you can Shift+rightclick
on the Taskbar button to see the Control Menu for that window.
You could also try using Win+arrowkey to move around a window. Click
the Taskbar button for the program, and use: Win+left to snap the window
to the upper left side of the screen, Win+right to snap to the upper
right side, Win+up to maximize to full screen height, and Win+down to normalize.
https://www.howtogeek.com/310/bring-misplaced-off-screen-windows-back-to-your-desktop-keyboard-trick/
Besides the other methods mentioned, it notes using WinLister. I forgot
I had this tool. I have most of Nirsoft's tools, and this one, too.
The "Centered Selected Windows" context menu item would snap and resize
those windows to the center of your monitor.
Do you have dual monitors? For multiple monitors, Win+Shift+left/right
moves the window between monitors. Win+P gives a menu of where you want
to project the screen.
You say cmd.exe loads okay in a new Windows account. There is always an Administrator account. It is created when you install Windows. It
prompts you to create another account. So, I'm not sure what you mean
by you installed an Administrator account when it should've already
existed. When booting Windows, does it automatically log into your
Windows account (i.e., never ask you which account to use)? Automatic
login won't show accounts you can log into.
Run netplwiz to see a list of accounts. For the one called
Administrator, you just created that account, or you just logged into it
for the first time? For the "User must enter a username ..." option, is
it selected, or not?
Are you using Applocker?
https://learn.microsoft.com/en-us/windows/security/application-security/application-control/app-control-for-business/applocker/applocker-overview
https://www.youtube.com/watch?v=xVVgXnorpvA
Or Software Restriction Policies (SRPs)?
https://learn.microsoft.com/en-us/windows-server/identity/software-restriction-policies/software-restriction-policies
https://www.youtube.com/watch?v=L--wgJJrosY https://www.tenforums.com/tutorials/124008-use-applocker-allow-block-executable-files-windows-10-a.html
You didn't say which edition of Windows 10 you have. Home editions
don't have either the gpedit.msc or secpol.msc policy editors. When I
had a Pro edition, I played with Applocker for a short time, but decided
it was too complicated to bother with, and I didn't need to lockdown my computer that hard, anyway. However, if you log into a domain account
it is possible security policies get pushed to your workstation. You probably are logging into a local account, but something or someone
could still add registry entries for policies. According to:
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/ee844171(v=ws.11)
Applocker settings are stored under:
\HKEY_LOCAL_Machine\Software\Policies\Microsoft\Windows\SrpV2
The key name hints Applocker is the 2nd version of SRP (Software
Restriction Policy).
I've used SRPs in the past to block a program from loading. I added a
Path rule to specify which .exe I did not want to allow to load. These
were locally defined by me, not pushed by a domain login. All policies
are defined in the registry, but SRPs are hash protected.
Local group policies are stored under C:\Windows\System32\GroupPolicy to
get merged into the registry during startup for computer policies or
during logon for user policies. When using gpedit.msc, you are viewing
what is under C:\Windows\System32\GroupPolicy, not what is currently
loaded in the registry.
SRPs are not applied when booting into Windows safe mode. Try that and logging into your account to retest cmd.exe.
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh994620(v=ws.11)?redirectedfrom=MSDN#if-you-experience-problems-with-applied-policy-settings-restart-windows-in-safe-mode
Microsoft tried to neuter SRPs, but there are hacks to keep it working.
They want you to use Applocker. But if you used SRPs before, and
upgraded Windows instead of a fresh install, possibly some SRPs survived
into the upgrade.
https://borncity.com/win/2023/02/24/software-restriction-policies-safer-still-possible-under-windows-11-22h2/
3rd-party security software could also effect the same disable/block on starting programs.
On two of my Win10 systems, I can swap between Powershell and command
prompt. But on the third there's a most peculiar problem. Settings/Personalisation/Taskbar has the option to switch between the
two. When I set it to CMD, CMD appears for a second in a tiny window and
then disappears. I can't get it to stay put.
Ed Cryer wrote:
I ran this on Powershell.
echo off
reg delete "HKCU\Console" /f
reg delete "HKCU\Software\Microsoft\Command Processor" /v "AutoRun" /f
reg delete "HKLM\Software\Microsoft\Command Processor" /v "AutoRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\cmd.exe" /f
echo done
Ed
Have you seen my SOLVED posting in this thread?
It worked for me. I found it in a Google search for this problem.
I'm no expert on Win10, but I should think that the things done therein should reveal the underlying cause to someone who is.
Ed
reg delete "HKCU\Console" /f
reg delete "HKCU\Software\Microsoft\Command Processor" /v "AutoRun" /f
reg delete "HKLM\Software\Microsoft\Command Processor" /v "AutoRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\cmd.exe" /f
On Fri, 25 Apr 2025 10:36:11 +0100, Ed Cryer wrote:
On two of my Win10 systems, I can swap between Powershell and command
prompt. But on the third there's a most peculiar problem.
Settings/Personalisation/Taskbar has the option to switch between the
two. When I set it to CMD, CMD appears for a second in a tiny window and
then disappears. I can't get it to stay put.
You need to invoke it with the /k option, and the only way I know to
do that is to put the command in a shortcut.
I can't imagine why you'd need /k on a cmd shortcut.
Ed Cryer <ed@somewhere.in.the.uk> wrote:
Have you seen my SOLVED posting in this thread?
It worked for me. I found it in a Google search for this problem.
I'm no expert on Win10, but I should think that the things done therein
should reveal the underlying cause to someone who is.
Ed
Yep, saw it. First response was you have a corrupted Windows account.
But I'm not sure that explains why an executable won't run other than
SRPs, Applocker, or something else you run under your Windows account
that blocks execution of some programs. You said you created the Administrator account, but it should exist when you install Windows. It
is a default account. In fact, it is the only account that has the same
SID (Security Identifier) across all Windows installations.
https://learn.microsoft.com/en-us/windows/security/identity-protection/access-control/local-accounts
"Every computer has an Administrator account (SID S-1-5-domain-500,
display name Administrator)."
When you said you "created" the Administrator account, maybe what you
meant was you got it added to the login screen, so you could pick it
from a list, like you ran "net user administrator /active:yes" in either
a cmd or Powershell shell (with admin privs). Or, it was the first time
you logged into the Administrator account which then created a profile folder, and did the initial setup for the account. Unlikely you created
an account that already existed. You cannot delete Administrator, but
you can rename it.
The Administrator account should not be used as an everyday account.
You should create another user account to play with. Because Windows profiles can get corrupted, and beyond the Administrator account the
setup creates at the start, I create a backup admin-level account. So,
I end up with Administrator, BkupAdmin, and 1 or more user accounts.
Update:
I have filters that will flag posts to hide them. I did not see your "SOLVED" subthread, because one of my filters flags posts that have all uppercase in the Subject. One, that is YELLING. Two, spammers and
trolls are desparate to get attention. When I switched to a view that
showed ignore-flagged posts, I saw yours. I'll reply under that
subthread.
VanguardLH wrote:[...]
Update:
I have filters that will flag posts to hide them. I did not see your "SOLVED" subthread, because one of my filters flags posts that have all uppercase in the Subject. One, that is YELLING. Two, spammers and
trolls are desparate to get attention. When I switched to a view that showed ignore-flagged posts, I saw yours. I'll reply under that
subthread.
Hiya man.
It used be standard good netiquette to put "solved" in upper case; in
Web and Usenet threads. I'm not going to apologise for having done it
here.
Your filtering out of them is your personal affair. I have no
battle with upper-case abusers because I don't get any.
It used be standard good netiquette to put "solved" in upper case; in
Web and Usenet threads. I'm not going to apologise for having done it
here.
On Fri, 25 Apr 2025 13:14:45 -0700, Stan Brown
<the_stan_brown@fastmail.fm> wrote:
On Fri, 25 Apr 2025 10:36:11 +0100, Ed Cryer wrote:
On two of my Win10 systems, I can swap between Powershell and command
prompt. But on the third there's a most peculiar problem.
Settings/Personalisation/Taskbar has the option to switch between the
two. When I set it to CMD, CMD appears for a second in a tiny window and >> then disappears. I can't get it to stay put.
You need to invoke it with the /k option, and the only way I know to
do that is to put the command in a shortcut.
I can't imagine why you'd need /k on a cmd shortcut. When you launch cmd
from a shortcut, it already stays open without the /k option.
Ed Cryer <ed@somewhere.in.the.uk> wrote:
VanguardLH wrote:
Update:
I did not see your "SOLVED" subthread, because one of my filters
flags posts that have all uppercase in the Subject.
It used be standard good netiquette to put "solved" in upper case; in
Web and Usenet threads. I'm not going to apologise for having done it
here.
Well, the "standard good netiquette" was/is to *add* 'SOLVED' in the
subject line, not to replace the subject. But you're forgiven! :-)
Frank Slootweg <this@ddress.is.invalid> wrote:
Ed Cryer <ed@somewhere.in.the.uk> wrote:
VanguardLH wrote:
Update:
I did not see your "SOLVED" subthread, because one of my filters
flags posts that have all uppercase in the Subject.
It used be standard good netiquette to put "solved" in upper case; in
Web and Usenet threads. I'm not going to apologise for having done it
here.
Well, the "standard good netiquette" was/is to *add* 'SOLVED' in the
subject line, not to replace the subject. But you're forgiven! :-)
Netiquette when modifying the Subject header (which adding SOLVED or
changing to just SOLVED would do) is to show the new Subject header and append "(was: <originalSubject>)", so here it looked like:
Solved (was: No CMD)
I have also seen:
Solved - No CMD
I don't recall "Solved" was to be all uppercased, but I don't visit all newsgroups. Been in Usenet since around 92. At the height of where I visited, I used to inhabit 52 newsgroups, but that's waned to 19 now.
If the original Subject was still there, and "SOLVED" had been added,
the Subject would not have been all uppercase: the "o" was lowercase. Prepending "Solved" would also not have the Subject as all uppercase.
I'll look into my all-uppercase filter to see if I can add an exception
for just "SOLVED"; i.e., Subject starts with "solved" whether upper- or lowercase, or mix of both; however, that would permit starter posts that aren't replies, like "SOLVE YOUR DEBT".
Stan Brown <the_stan_brown@fastmail.fm> wrote:
You need to invoke it with the /k option, and the only way I know to
do that is to put the command in a shortcut.
I can't imagine why you'd need /k on a cmd shortcut. When you launch cmd
from a shortcut, it already stays open without the /k option.
VanguardLH wrote on 4/26/2025 6:50 PM:
Frank Slootweg <this@ddress.is.invalid> wrote:
Ed Cryer <ed@somewhere.in.the.uk> wrote:
VanguardLH wrote:
Update:
I did not see your "SOLVED" subthread, because one of my filters
flags posts that have all uppercase in the Subject.
It used be standard good netiquette to put "solved" in upper case; in
Web and Usenet threads. I'm not going to apologise for having done it
here.
Well, the "standard good netiquette" was/is to *add* 'SOLVED' in the
subject line, not to replace the subject. But you're forgiven! :-)
Netiquette when modifying the Subject header (which adding SOLVED or
changing to just SOLVED would do) is to show the new Subject header and
append "(was: <originalSubject>)", so here it looked like:
Solved (was: No CMD)
I have also seen:
Solved - No CMD
I don't recall "Solved" was to be all uppercased, but I don't visit all
newsgroups. Been in Usenet since around 92. At the height of where I
visited, I used to inhabit 52 newsgroups, but that's waned to 19 now.
If the original Subject was still there, and "SOLVED" had been added,
the Subject would not have been all uppercase: the "o" was lowercase.
Prepending "Solved" would also not have the Subject as all uppercase.
I'll look into my all-uppercase filter to see if I can add an exception
for just "SOLVED"; i.e., Subject starts with "solved" whether upper- or
lowercase, or mix of both; however, that would permit starter posts that
aren't replies, like "SOLVE YOUR DEBT".
Here is a forum that might help you and ed.
h**ps:// able2know. org/ forum/ english_grammar/
Many experts there that can nitpick the tiniest of grammar mistakes.
Char,
I can't imagine why you'd need /k on a cmd shortcut.
What the OP describes happens when then an "execute this" part has been >addded without the /k argument.
IOW, the OP /might/ not have told us everything.
Besides, adding it (just after the first, ending on \CMD.EXE, part) sounds >like a good idea as a debugging step. If the console window than stays open >...
And for the record, I've got several cmd shortcuts using the /k argument and >a batchfile which does some initializing for me.
I can't imagine why you'd need /k on a cmd shortcut.
What the OP describes happens when then an "execute this" part
has been addded without the /k argument.
I think I misunderstood. I thought we were talking about a shortcut
that only launches a Command Prompt that does nothing,
For example, create an example.bat
file containing:
echo List users ...
cmd.exe /c net users
echo
echo Check if Administrator is listed.
I've used batch scripts to do setup before cmd.exe, check
status afterward, and perform other actions both before and
after the cmd.exe call.
If I want the 2nd shell to pause for whatever it called
to execute that doesn't itself halt to show output, I have to
change /c to /k in either the batch script's call of cmd.exe,
or to the cmd.exe that the shortcut runs
In the OP's case, he had corrupted registry entries regarding
the command shell. Since he deleted those registry entries,
we don't know what they specified
Vanguard,
For example, create an example.bat
In the OP's case, he had corrupted registry entries regarding
the command shell. Since he deleted those registry entries,
we don't know what they specified
Remarkable that you just know those lines where corrupted*, even though you >have no idea what was in them.
* and not, for example, just altered due to having changed some settings in
a dialog.
But I guess "corrupted" sounds way more important than "inadvertedly >changed".
Regards,
Rudy Wieser
In the OP's case, he had corrupted registry entries regarding
the command shell. Since he deleted those registry entries,
we don't know what they specified
Uhm, don't Windows keep back-up copies of the Registry all over the
damned computer? Mine always has.
But I guess "corrupted" sounds way more important than
"inadvertedly changed".
Same thing, only more official and scary, yes?
Which, I suppose was your point. :)
Frank Slootweg <this@ddress.is.invalid> wrote:
Ed Cryer <ed@somewhere.in.the.uk> wrote:
VanguardLH wrote:
Update:
I did not see your "SOLVED" subthread, because one of my filters
flags posts that have all uppercase in the Subject.
It used be standard good netiquette to put "solved" in upper case; in
Web and Usenet threads. I'm not going to apologise for having done it
here.
Well, the "standard good netiquette" was/is to *add* 'SOLVED' in the
subject line, not to replace the subject. But you're forgiven! :-)
Netiquette when modifying the Subject header (which adding SOLVED or
changing to just SOLVED would do) is to show the new Subject header and append "(was: <originalSubject>)", so here it looked like:
Solved (was: No CMD)
VanguardLH wrote:
Netiquette when modifying the Subject header (which adding SOLVED or
changing to just SOLVED would do) is to show the new Subject header and
append "(was: <originalSubject>)", so here it looked like:
Solved (was: No CMD)
Did you notice how the Subject: changed from your 'Change of Subject
(was: No CMD)' to my 'Re: Change of Subject' ??
My SeaMonkey Suite (and, I think, Thunderbird) does that auto-
magically ... getting rid of the bracketed stuff!
Ed Cryer wrote:
I ran this on Powershell.
echo off
reg delete "HKCU\Console" /f
reg delete "HKCU\Software\Microsoft\Command Processor" /v "AutoRun" /f
reg delete "HKLM\Software\Microsoft\Command Processor" /v "AutoRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\cmd.exe" /f
echo done
Ed
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 508 |
Nodes: | 16 (1 / 15) |
Uptime: | 238:43:24 |
Calls: | 9,985 |
Calls today: | 3 |
Files: | 13,836 |
Messages: | 6,358,296 |