Windows 10: Stop processes associated with a service through Command Prompt on startup

Discus and support Stop processes associated with a service through Command Prompt on startup in Windows 10 BSOD Crashes and Debugging to solve the problem; Hello, I am having an issue where a service, AppXSvc, is causing explorer.exe to go into a crash loop on startup. The only workarounds I have found... Discussion in 'Windows 10 BSOD Crashes and Debugging' started by Jack Zimmer, Nov 18, 2020.

  1. Stop processes associated with a service through Command Prompt on startup


    Hello,


    I am having an issue where a service, AppXSvc, is causing explorer.exe to go into a crash loop on startup. The only workarounds I have found are either disabling the AppXSvc service through the registry, or to open Task Manager when explorer starts crashing, go into the "Services" tab, find AppXSvc, right click on it, go to details, and then kill the "svchost.exe" with the corresponding PID to the service. You can see some of the things I have tried so far over at this thread: https://answers.microsoft.com/en-us/windows/forum/all/windows-explorer-crashing-with-code-0xc0000409/acceaf97-3129-4cc4-baa0-73f06bcd045b. So now, I am wondering if there is some sort of program or command I can have run at startup that can do 1 of 2 things. 1: Find the PID of a service, then kill it automatically. Key word there is automatically, doing this myself is a bit of a hustle every time my system starts up. Also the PID of the service is different every time, so I couldn't just schedule a task to kill PID 6188 for example. 2: Restart the service on startup. Only problem with that is the service is marked as NOT_STOPPABLE most of the time. I have tried creating a task through Task Scheduler that runs under TrustedInstaller that attempts to restart the service, came back with "this control is not valid for the service". If there is some way that could bypass the NOT_STOPPABLE flag that could work as well.



    TL;DR: Is there a program or script I could write that finds and stops a randomized PID of a service on startup?


    Edit: Looking over at the thread I linked, I realized I forgot to address something. I attempt to delay the service via the registry, but the service still started up with no delay, despite the startup type showing as "Automatic Delayed Start" in services.msc.

    :)
     
    Jack Zimmer, Nov 18, 2020
    #1
  2. cwtech Win User

    command prompt will not open in safe mode with command prompt

    Would I just follow the same steps within safe mode after hooking up to the other system?
     
    cwtech, Nov 18, 2020
    #2
  3. Bree Win User
    Installation media boots to command prompt

    I've just booted from known working install media to see exactly what it does when booting. The sequence of events is...

    1. Windows logo on a black screen
    2. circling dots appear beneath the logo
    3. light blue 'Please wait' screen with circling dots
    4. a command prompt window (very briefly)
    5. the initial Setup page appears

    Do you see steps 1-3? If so, it appears you have stopped at step 4, suggesting that something on the disc cannot be read.

    Does the disc boot properly in another machine? If so, try cleaning the laptop's drive lens then try booting from the disc again.

    If not, make new install media with Microsoft's Media Creation Tool, either as a bootable USB, on an ISO that you can burn to another disc. At Step 8 in Option One of this tutorial you can choose between making a USB or an ISO.

    Download Windows 10 ISO File
     
  4. Stop processes associated with a service through Command Prompt on startup

    Stopping Windows Services and Processes

    Thanks, DaveM, help always appreciated, I'm following through with an earlier suggestion at this time and it's looking good, but, if it's not successful I will gladly give your suggestion a try, kind regards.
     
    William J_997, Nov 18, 2020
    #4
Thema:

Stop processes associated with a service through Command Prompt on startup

Loading...
  1. Stop processes associated with a service through Command Prompt on startup - Similar Threads - Stop processes associated

  2. Windows 11 Startup Command Prompt

    in Windows 10 Gaming
    Windows 11 Startup Command Prompt: So, I am using Windows 11 and I noticed something strange with the startup command prompt. Whenever you go to the command prompt section it doesn't require an administrator password to get into the admin command prompt. Is this supposed to happen? I'm pretty sure this is a...
  3. Command prompt startup issue

    in Windows 10 Gaming
    Command prompt startup issue: Hi! I have this problem for a while now. When starting or restarting my PC Win 11 OS, I keep encountering this issue wherein cmd keeps popping up and saying, "Windows cannot find '--minimized'. Make sure you've typed the name correctly, then try again."I keep looking for...
  4. Command prompt startup issue

    in Windows 10 Software and Apps
    Command prompt startup issue: Hi! I have this problem for a while now. When starting or restarting my PC Win 11 OS, I keep encountering this issue wherein cmd keeps popping up and saying, "Windows cannot find '--minimized'. Make sure you've typed the name correctly, then try again."I keep looking for...
  5. No Command Prompt in Advanced Startup

    in Windows 10 Gaming
    No Command Prompt in Advanced Startup: Hi, I tried to recover my password in advanced startup on my HP laptop Windows 11 but unfortunately, I can't find the command prompt when I go in to troubleshoot I see only the start-up settings and UEFI firmware I can't find the command prompt please help thanks by the way I...
  6. No Command Prompt in Advanced Startup

    in Windows 10 Software and Apps
    No Command Prompt in Advanced Startup: Hi, I tried to recover my password in advanced startup on my HP laptop Windows 11 but unfortunately, I can't find the command prompt when I go in to troubleshoot I see only the start-up settings and UEFI firmware I can't find the command prompt please help thanks by the way I...
  7. command prompt starting on desktop startup

    in Windows 10 BSOD Crashes and Debugging
    command prompt starting on desktop startup: Hi recently whenever I turn on my deviceASUS LAPTOP windows 10 the command promt suddenly opens and closes like within a second it has happened to me a numerous times now pls help me....
  8. Trying to kill a process through command prompt forcefully but this message comes up

    in Windows 10 Ask Insider
    Trying to kill a process through command prompt forcefully but this message comes up: ERROR: The process "SAntivirusClient.exe" with PID 11720 could not be terminated. Reason: Access is denied. Is there any way to change this? I have all Admin settings turned on and stuff I believe. submitted by /u/Sage_of_Shadowdale [link] [comments]...
  9. Regular command prompt on Advanced startup

    in Windows 10 Network and Sharing
    Regular command prompt on Advanced startup: Is it possible to access regular Command Prompt (non-administrator command prompt), through advanced startup? If so, how do i get to it? https://answers.microsoft.com/en-us/windows/forum/all/regular-command-prompt-on-advanced-startup/b480184b-f422-4c56-8214-c0274f294009"
  10. Something running in command prompt on startup.

    in Windows 10 Customization
    Something running in command prompt on startup.: I am running Windows 10. When I start my computer, a few items pop up in cmd command prompts and run so quickly I can't read them. I could just read "permission denied" at the end of one of them. I didn't set that up. How can I find out what it is?...