• Re: No CMD

    From Paul@3:633/280.2 to All on Fri Apr 25 20:31:28 2025
    On Fri, 4/25/2025 5:36 AM, 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.

    I've run DISM and sfc, have the latest 22H2 19045.5796 build.

    Ed

    Okay, open the Settings, type "Relia" in the search box
    and locate the Reliability Monitor. Check the events of
    today, and see if anything is recorded for your disappearing
    shells. If the entry for the cmd.exe croaking has an error
    number, run it through Google and see what the error indicates.
    (As long as it is not "Something Happened" of course.)

    Another way to look at an error number, is with the
    command line error number lookup tool (which you would
    have to run on another computer at the moment).

    https://www.microsoft.com/en-us/download/details.aspx?id=100432

    Err_6.4.5.exe File Size: 2.2 MB

    There are lots of errors that aren't in there,
    like the newly created error numbers.

    Paul

    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (3:633/280.2@fidonet)
  • From VanguardLH@3:633/280.2 to All on Fri Apr 25 21:05:13 2025
    Keywords: VanguardLH,VLH

    Ed Cryer <ed@somewhere.in.the.uk> 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.

    I've run DISM and sfc, have the latest 22H2 19045.5796 build.

    Not sure what config wizard setting to which you refer. When I
    right-click on a blank area of the Taskbar, click on Taskbar Settings in
    the context menu, I don't see a toggle choosing between Command or
    Powershell. I see:

    Replace Command Prompt with Windows PowerShell in the menu
    when I right-click the start button or press Windows key+X.

    The only times I start cmd.exe this way is when reading some online help
    file on starting cmd.exe. I use a shortcut to cmd.exe, and the shortcut
    is in a toolbar in the Taskbar configured to run with admin privs (so
    the UAC prompt appears). I can also click on the Start menu button, and
    enter "cmd" which shows Command Prompt as a match. The first match
    opens in non-admin mode. Another match let me click on its rightward
    chevron to get more choices, like Open or Run as administrator.

    How are you starting cmd.exe? If using a shortcut, make sure to add the
    /k command-line argument to keep open the console window, like:

    cmd.exe /k

    Normally, when cmd is done running whatever your told it to run, the
    console window closes, because the cmd shell unloads after running
    whatever you told cmd.exe to run. You want to keep the shell loaded, so
    add /k switch. Also check which cmd.exe the shortcut specifies. Have
    it point at the one under the system32 folder.

    In Task Manager, check if any instances of cmd.exe are running. If so,
    kill them. You don't say how you run cmd. Try the following:

    - Bring up the Task Manager (Ctrl+Shift+Esc).
    o Select the Details tab.
    o Click on the Name column header to sort by process name.
    o Scroll down to where the C's would start.
    o Check there are no running instances of cmd.exe
    - Run cmd.exe:
    o Bring up the Run dialog (Win+R).
    o Or, use the File -> Run new task menu in Task Manager.
    - Enter: cmd.exe. Include the .exe extension. Click OK.

    See a console window now?
    Did the console window stay open?
    In Task Manager, did you see cmd.exe show up?

    If you saw cmd.exe show up in Task Manager, but only temporarily, and
    its console window did not stay open, do the above again; however,
    instead of relying on pathing to find the cmd.exe executable file, enter
    the full path to the executable: c:\windows\system32\cmd.exe.

    Look in Event Viewer to see if an error got reported when trying to load cmd.exe.

    cmd.exe is one of the programs often attacked by malware to prevent the
    user from have a low-level tool to undo the malware. Run a full scan
    using your anti-virus software. If using Windows Defender, see:

    https://learn.microsoft.com/en-us/defender-endpoint/command-line-arguments-microsoft-defender-antivirus

    and run:

    mpcmdrun.exe -scan -scantype 2

    Defender's manual scan is slow, so it will take a long time to complete.
    If its console window disappears after it completes, so you don't get to
    see its output, pipe stdout into a file to open in Notepad, like:

    mpcmdrun.exe -scan -scantype 2 > %temp%\mpscan.txt & notepad %temp%\mpscan.txt

    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: Usenet Elder (3:633/280.2@fidonet)
  • From MikeS@3:633/280.2 to All on Sat Apr 26 00:47:25 2025
    On 25/04/2025 14:42, 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

    There are often multiple copies of cmd.exe in the Windows folder. Try
    another one, eg C:\Windows\SysWOW64\cmd.exe

    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (3:633/280.2@fidonet)
  • From ...winston@3:633/280.2 to All on Sat Apr 26 01:12:19 2025
    VanguardLH wrote:
    Ed Cryer <ed@somewhere.in.the.uk> 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.

    I've run DISM and sfc, have the latest 22H2 19045.5796 build.

    Not sure what config wizard setting to which you refer. When I
    right-click on a blank area of the Taskbar, click on Taskbar Settings in
    the context menu, I don't see a toggle choosing between Command or Powershell. I see:

    Replace Command Prompt with Windows PowerShell in the menu
    when I right-click the start button or press Windows key+X.

    The only times I start cmd.exe this way is when reading some online help
    file on starting cmd.exe. I use a shortcut to cmd.exe, and the shortcut
    is in a toolbar in the Taskbar configured to run with admin privs (so
    the UAC prompt appears). I can also click on the Start menu button, and enter "cmd" which shows Command Prompt as a match. The first match
    opens in non-admin mode. Another match let me click on its rightward
    chevron to get more choices, like Open or Run as administrator.

    How are you starting cmd.exe? If using a shortcut, make sure to add the
    /k command-line argument to keep open the console window, like:

    cmd.exe /k

    Normally, when cmd is done running whatever your told it to run, the
    console window closes, because the cmd shell unloads after running
    whatever you told cmd.exe to run. You want to keep the shell loaded, so
    add /k switch. Also check which cmd.exe the shortcut specifies. Have
    it point at the one under the system32 folder.

    In Task Manager, check if any instances of cmd.exe are running. If so,
    kill them. You don't say how you run cmd. Try the following:

    - Bring up the Task Manager (Ctrl+Shift+Esc).
    o Select the Details tab.
    o Click on the Name column header to sort by process name.
    o Scroll down to where the C's would start.
    o Check there are no running instances of cmd.exe
    - Run cmd.exe:
    o Bring up the Run dialog (Win+R).
    o Or, use the File -> Run new task menu in Task Manager.
    - Enter: cmd.exe. Include the .exe extension. Click OK.

    See a console window now?
    Did the console window stay open?
    In Task Manager, did you see cmd.exe show up?

    If you saw cmd.exe show up in Task Manager, but only temporarily, and
    its console window did not stay open, do the above again; however,
    instead of relying on pathing to find the cmd.exe executable file, enter
    the full path to the executable: c:\windows\system32\cmd.exe.

    Look in Event Viewer to see if an error got reported when trying to load cmd.exe.

    cmd.exe is one of the programs often attacked by malware to prevent the
    user from have a low-level tool to undo the malware. Run a full scan
    using your anti-virus software. If using Windows Defender, see:

    https://learn.microsoft.com/en-us/defender-endpoint/command-line-arguments-microsoft-defender-antivirus

    and run:

    mpcmdrun.exe -scan -scantype 2

    Defender's manual scan is slow, so it will take a long time to complete.
    If its console window disappears after it completes, so you don't get to
    see its output, pipe stdout into a file to open in Notepad, like:

    mpcmdrun.exe -scan -scantype 2 > %temp%\mpscan.txt & notepad %temp%\mpscan.txt


    Settings/Personalization/Taskbar/ yields the same settings options as
    Rt.Click Taskbar/Taskbar Settings

    The only purpose of this settings is to change what is shown(Command.com
    or Powershell) in the window for the Start Menu button(right click) or
    the Quick Menu(Windows key + X).
    i.e. it doesn't run Command.com or Powershell


    The symptom of running Command.com from the above menu options and
    resulting in it disappearing(brief window) was a known issue quite some
    time ago(circa 20H2)
    - the fix was to access the command.com shortcut and ensure it was configured to run in a normal window but not run in a
    minimized/maximized window. If set to 'normal' temporarily toggle it to minimized or maximum, restart, then reset back to normal.
    - Note: Even when changing the shortcut properties to use the
    command.com /k option, it was still necessary to reset/toggle/toggle
    back the properties window setting. Since multiple access points(to command.com) in Windows or user configured/created shortcuts exist, all command.com shortcuts should be configured/reset to run in the same window(e.g. Normal). Finally, configuring the shortcut to run-as Admin
    or not is not related to the disappearing issue(it can be admin or not).

    --
    ....w¡ñ§±¤ñ

    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (3:633/280.2@fidonet)
  • From VanguardLH@3:633/280.2 to All on Sat Apr 26 03:53:30 2025
    Keywords: VanguardLH,VLH

    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.

    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: Usenet Elder (3:633/280.2@fidonet)
  • From Stan Brown@3:633/280.2 to All on Sat Apr 26 06:14:45 2025
    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.

    --
    Stan Brown, Tehachapi, California, USA https://BrownMath.com/
    Shikata ga nai...

    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: Oak Road Systems (3:633/280.2@fidonet)
  • From VanguardLH@3:633/280.2 to All on Sat Apr 26 11:53:58 2025
    Keywords: VanguardLH,VLH

    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.

    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: Usenet Elder (3:633/280.2@fidonet)
  • From Char Jackson@3:633/280.2 to All on Sat Apr 26 15:14:31 2025
    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.


    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: Newshosting.com - Highest quality at a great p (3:633/280.2@fidonet)
  • From R.Wieser@3:633/280.2 to All on Sat Apr 26 19:02:17 2025
    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.

    Regards,
    Rudy Wieser



    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (3:633/280.2@fidonet)
  • From Frank Slootweg@3:633/280.2 to All on Sun Apr 27 01:01:02 2025
    Ed Cryer <ed@somewhere.in.the.uk> wrote:
    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.

    Well, the "standard good netiquette" was/is to *add* 'SOLVED' in the
    subject line, not to replace the subject. But you're forgiven! :-)

    Your filtering out of them is your personal affair. I have no
    battle with upper-case abusers because I don't get any.

    I have a similar filter, but once a day, I check the actions of the filter(s), so your 'indiscretion' was easily spotted and undone! :-)

    Anyway, you've gotten us an excuse to nitpick, so thanks for that!

    All the best.

    [...]

    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: NOYB (3:633/280.2@fidonet)
  • From Stan Brown@3:633/280.2 to All on Sun Apr 27 08:48:28 2025
    On Sat, 26 Apr 2025 12:00:47 +0100, Ed Cryer wrote:
    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.

    But you left one thing out of that standard good practice: Append
    SOLVED to the original subject line.

    Replacing the subject line entirely is not a good idea, because it
    breaks the human-eyeballs connection with the thread describing the
    problem. Yes, technically it's in the same thread, but it doesn't
    look that way to a human.

    --
    Stan Brown, Tehachapi, California, USA https://BrownMath.com/
    Shikata ga nai...

    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: Oak Road Systems (3:633/280.2@fidonet)
  • From Stan Brown@3:633/280.2 to All on Sun Apr 27 08:52:59 2025
    On Sat, 26 Apr 2025 00:14:31 -0500, Char Jackson wrote:

    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.

    You're right. I typically run cmd with a canned command in a
    shortcut, and I assumed (oops) that it behaved the same with other
    launch methods.

    --
    Stan Brown, Tehachapi, California, USA https://BrownMath.com/
    Shikata ga nai...

    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: Oak Road Systems (3:633/280.2@fidonet)
  • From VanguardLH@3:633/280.2 to All on Sun Apr 27 10:36:18 2025
    Keywords: VanguardLH,VLH

    Char Jackson <none@none.invalid> wrote:

    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.

    We wouldn't know what was in the OP's shortcut if that's how he started
    it. Could be the shortcut [loads a cmd shell to] interpret a batch
    file, and it is in the batch script that cmd.exe gets used. That is, a
    batch file is a wrapper to cmd.exe. For example, create an example.bat
    file containing:

    echo List users ...
    cmd.exe /c net users
    echo
    echo Check if Administrator is listed.

    Then create a shortcut pointing to example.bat. When you double-click
    the shortcut, you see the console window appear for a second, and it disappears. 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 (like, "cmd.exe /k <progOrbatchfile>").

    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 as to what really was to run as the command shell.
    They could've effected the same as the above shortcut scenario: they ran
    a different shell than cmd.exe, or some wrapper/debugger on cmd.exe.

    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: Usenet Elder (3:633/280.2@fidonet)
  • From Char Jackson@3:633/280.2 to All on Sun Apr 27 11:48:09 2025
    On Sat, 26 Apr 2025 11:02:17 +0200, "R.Wieser" <address@is.invalid>
    wrote:

    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.

    I think I misunderstood. I thought we were talking about a shortcut that
    only launches a Command Prompt that does nothing, waiting for me to type
    a command, rather than a shortcut that launches a Command prompt that immediately executes a command. I always do the former, never the
    latter, but I think you're taking about the latter, right?


    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.

    Cool, thanks.


    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: Newshosting.com - Highest quality at a great p (3:633/280.2@fidonet)
  • From R.Wieser@3:633/280.2 to All on Sun Apr 27 16:45:01 2025
    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.

    I think I misunderstood. I thought we were talking about a shortcut
    that only launches a Command Prompt that does nothing,

    I assumed the same.

    BUT :

    1) The OP described something that matches behaviour of the presense of an "execute this" part. So, I applied "occam's razor" : the simpelest explanation is also the most likely one. :-)

    2) There was a suggestion to add the /k argument, and you could not imagine its use. So I supplied one.

    Two seperate things.

    Regards,
    Rudy Wieser



    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (3:633/280.2@fidonet)
  • From R.Wieser@3:633/280.2 to All on Sun Apr 27 21:12:25 2025
    Vanguard,

    For example, create an example.bat
    file containing:

    echo List users ...
    cmd.exe /c net users
    echo
    echo Check if Administrator is listed.

    Any reason you used "cmd.exe /c " there ? You're already in a commandline environment when you execute it (remove it and be amazed).

    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.

    Funny, I've been doing the same for years now, but have never had a(ny) need for that "cmd.exe /c ".

    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,

    That, an automatic cleanup after manually exiting a second commandline
    shell, would be one of the /very few/ reasons to open a second shell with
    the /k switch.

    or to the cmd.exe that the shortcut runs

    .... and that destroys the whole benefit of the above (the "automatic
    cleanup" would be executed before you got control).

    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



    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (3:633/280.2@fidonet)
  • From John@3:633/280.2 to All on Tue Apr 29 05:11:48 2025
    Reply-To: Anyone.but.me@this.time

    On Sun, 27 Apr 2025 13:12:25 +0200, "R.Wieser" <address@is.invalid>
    wrote:

    Vanguard,

    For example, create an example.bat

    <<snipped>>

    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.

    I thought that the only way of not doing so is to have extremely iffy
    malware running about, stuff that deliberately mungs Windows to
    prevent back-ups from forming so removing the malware is less easy.

    Or are W-10 and W-11 different?


    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".

    Same thing, only more official and scary, yes?

    Which, I suppose was your point. :)

    J.


    Regards,
    Rudy Wieser


    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: To protect and to server (3:633/280.2@fidonet)
  • From R.Wieser@3:633/280.2 to All on Tue Apr 29 07:15:18 2025
    John,

    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.

    Are you sure you are responding to the correct person ? That "In the OP's case" was said by VanguardLH, not me (Rudy Wieser).

    And no, mine never did. Than again, I'm (still) not using Win10. :-)

    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. :)

    Not my point, no. What was is that the intention behind both is rather different.

    Vanguard had, by his own admission, nothing to base his "corrupted" claim
    on, yet he did. Why ? Bluntly said, he was lying for some reason.

    "inadvertedly changed" (directly or indirectly by the user) was *way* more likely, but it just hasn't got any "definitive cause" sound to it.

    Regards,
    Rudy Wieser



    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (3:633/280.2@fidonet)