Windows 10: tasklist.exe and repeated application stalls, crashes, restart

Discus and support tasklist.exe and repeated application stalls, crashes, restart in Windows 10 Software and Apps to solve the problem; i'm going to link to another question as the user there is experiencing the same issues as me and has summarised it well.i am constanly getting the... Discussion in 'Windows 10 Software and Apps' started by gladial, Aug 19, 2023.

  1. gladial Win User

    tasklist.exe and repeated application stalls, crashes, restart


    i'm going to link to another question as the user there is experiencing the same issues as me and has summarised it well.i am constanly getting the popup shown in the other question alongside app crashes, apps restarting and long periods of stalling/freezing. chrome has crashed while making this post. recently updated pc so unsire what to do next,

    :)
     
    gladial, Aug 19, 2023
    #1
  2. kg415 Win User

    TASKLIST command LIES!

    I have two Windows 10 PCs connected to a NAS via 1Gps Ethernet and run applications such as Thunderbird, Lightroom, Quicken, and others that lock shared network files on the NAS when in use. On sleep, switch user, or lock screen,
    I wish to gracefully stop these apps if running to release the locks. I've not found a reliable way to do this. After trying to use the Windows Event Scheduler, LockandLoad, or Power Triggers to kill tasks when sleep/switch/lock events are detected, I've
    concluded this approach is futile: if a task doesn't clean up quickly enough after receiving a TASKKILL notification, it will be suspended with the shared files left in an unusable state.

    So to avoid this race condition, I wrote a batch script (below) that runs TASKKILL to end a list of applications, then loops running a TASKLIST command until the killed tasks are no longer listed, then runs a sleep/switch/lock command.
    I disabled the standard sleep and lock start menu items (haven't found a way to disable switch user), and created shortcuts to this script with appropriate arguments.

    It STILL does not work reliably. The only explanation I can think of is that the TASKLIST command must not be returning accurate info.

    What to do?

    @Echo off

    rem Kill tasks that lock shared files, then sleep, switch user, or lock session

    rem Usage:

    rem powersafe {sleep|switch|lock} task1 task2 ...

    rem

    rem Installation:

    rem Copy powersafe.bat to C:\Program Files\PowerSafe

    rem Copy sleep.lnk, switch.lnk, lock.lnk to:

    rem C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PowerSafe

    rem Download and install tsdiscon.exe in %SystemRoot%\System32 if necessary.

    if [%1]==[] (

    echo Usage: powersafe {sleep^|switch^|lock} task1 task2 ...

    exit /b 1

    )

    setlocal EnableExtensions

    set tasklist=

    :KILLTASKS

    if [%2]==[] goto KILLDONE

    taskkill /fi "USERNAME eq %USERNAME%" /im %2

    if errorlevel 0 set tasklist=%tasklist% %2

    shift /2

    goto KILLTASKS

    :KILLDONE

    for /f "tokens=4 delims= " %%G in ('tasklist /fi "IMAGENAME eq tasklist.exe" /nh') do SET id=%%G

    :WAIT

    tasklist /nh /fi "Session eq %id%" | findstr /i "%tasklist%"

    if errorlevel 1 (

    goto SLEEP

    )

    timeout /t 1 /nobreak

    goto WAIT

    :SLEEP

    echo %1

    if /i %1==sleep (

    Rundll32.exe Powrprof.dll,SetSuspendState Sleep

    ) else if /i %1==switch (

    %SystemRoot%\System32\tsdiscon.exe

    ) else if /i %1==lock (

    rem Does NOT lock! -- same as tsdiscon.exe

    rundll32.exe user32.dll,LockWorkStation

    )
     
    kg415, Aug 19, 2023
    #2
  3. yok33 Win User
    Tasklist problem. Please help.

    I tried the following steps to get a list of the processes running on my computer. I actually found it on the Microsoft Windows support website.

    "use the command line command tasklist. For example, in

    Start >Run, type

    tasklist /FO CSV>C:\tasklist.csv [click OK]

    This will produced an Excel spreadsheet of the Task Manager information"

    It seems to run fine, but I have absolutely no idea as to WHERE the list goes to? I cannot find it!

    If someone can help me out on this it would be greatly appreciated, or if someone knows a more simple way to get a list of the processes running on my computer, please let me know.

    In the mean time, I will keep pulling the last few hairs out of my head.

    Yok3233
     
    yok33, Aug 19, 2023
    #3
  4. Bachalo Win User

    tasklist.exe and repeated application stalls, crashes, restart

    Auto restart executable after application crashes [Windows]

    Creating a standalone application for a kiosk that must be up and running 24 7.

    In the rare even the application crashes I need some way to make it auto restart.
    I'm running Windows 10 on a Nuc.

    Can any Windows experts suggest the best way to achieve this?
     
    Bachalo, Aug 19, 2023
    #4
Thema:

tasklist.exe and repeated application stalls, crashes, restart

Loading...
  1. tasklist.exe and repeated application stalls, crashes, restart - Similar Threads - tasklist exe repeated

  2. Repeated Crashing of Application

    in Windows 10 Software and Apps
    Repeated Crashing of Application: Hello,I have been dealing with a persistent application crash for quite some time now, and I am hoping someone here can help identify the root cause or suggest a potential fix. Here are the three reports from Event Viewer that I get every time it crashes including a link to...
  3. Repeated Crashing of Application

    in Windows 10 Gaming
    Repeated Crashing of Application: Hello,I have been dealing with a persistent application crash for quite some time now, and I am hoping someone here can help identify the root cause or suggest a potential fix. Here are the three reports from Event Viewer that I get every time it crashes including a link to...
  4. Windows repeatedly crashes and restarts with an occasional blue screen crash.

    in Windows 10 Gaming
    Windows repeatedly crashes and restarts with an occasional blue screen crash.: I have tried reinstalling windows, uninstalled faceit anticheat, cpu and gpu temps are normal, ran windows diagnostics, system scan, HP hardware diagonistics show all hardware is fine but the problem still persists. Attached below is the event viewer records for errors, if...
  5. Windows repeatedly crashes and restarts with an occasional blue screen crash.

    in Windows 10 Software and Apps
    Windows repeatedly crashes and restarts with an occasional blue screen crash.: I have tried reinstalling windows, uninstalled faceit anticheat, cpu and gpu temps are normal, ran windows diagnostics, system scan, HP hardware diagonistics show all hardware is fine but the problem still persists. Attached below is the event viewer records for errors, if...
  6. tasklist.exe and repeated application stalls, crashes, restart

    in Windows 10 BSOD Crashes and Debugging
    tasklist.exe and repeated application stalls, crashes, restart: i'm going to link to another question as the user there is experiencing the same issues as me and has summarised it well.i am constanly getting the popup shown in the other question alongside app crashes, apps restarting and long periods of stalling/freezing. chrome has...
  7. tasklist.exe and repeated application stalls, crashes, restart

    in Windows 10 Gaming
    tasklist.exe and repeated application stalls, crashes, restart: i'm going to link to another question as the user there is experiencing the same issues as me and has summarised it well.i am constanly getting the popup shown in the other question alongside app crashes, apps restarting and long periods of stalling/freezing. chrome has...
  8. Program EXE gets corrupted with every restart, I have to repeatedly copy over EXE files...

    in Windows 10 Gaming
    Program EXE gets corrupted with every restart, I have to repeatedly copy over EXE files...: This randomly happens one day. I was using the program with no issue for a year in this particular computer. No problems.I have no idea what exactly causes this because I've scanned the computer multiple times with WIndows defender, and even additional antivirus like...
  9. Program EXE gets corrupted with every restart, I have to repeatedly copy over EXE files...

    in Windows 10 Software and Apps
    Program EXE gets corrupted with every restart, I have to repeatedly copy over EXE files...: This randomly happens one day. I was using the program with no issue for a year in this particular computer. No problems.I have no idea what exactly causes this because I've scanned the computer multiple times with WIndows defender, and even additional antivirus like...
  10. Repeated crashes and faulting application paths

    in Windows 10 Drivers and Hardware
    Repeated crashes and faulting application paths: I started having issues with repeated BSOD and reboots two weeks ago. I have a Dell inspiron 7506 working on windows 10, went through dell support and was told it's a software issue which they won't help diagnose for free. I went through windows fresh start and reset my...