Forum Discussion

TimothyMitchell's avatar
TimothyMitchell
Copper Contributor
Aug 01, 2024

Terminating a Process for Another User

New Release: Windows 11 24H1

 

I am currently facing a challenge with user switching on our Windows computers. The issue arises when multiple users are using the same computer and an application automatically launches at startup. If another user logs in through Fast User Switching, they encounter an error message indicating that the application is already running. 

 

To address this issue, I attempted to resolve it by adjusting the application's auto-start settings and creating a batch file with the following commands:

 

Code:

taskkill /im program.exe /t /f

@start "" "C:\path\program.exe"

 

Subsequently, I generated a shortcut for the batch file and placed it in the C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup directory.

 

One potential cause of this error could be related to user permissions, specifically if some users do not have admin privileges.

No RepliesBe the first to reply

Resources