Windows 11 23H2
I've ran into an issue where I encounter an error when switching users on Windows computers. I have an application that starts with Windows. If another user (Fast User Switching) logs on, they get an error that the application is already running. I have tried disabling auto-start in the application's settings and creating a batch file with something like:
I then create a shortcut for the batch file and place the shortcut in the C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup folder.
I think the problem is that some users are not admin.
Is there anyway to kill an application that is running under an admin account when a non-admin user logs on, and then restart the program under the current user?
I've ran into an issue where I encounter an error when switching users on Windows computers. I have an application that starts with Windows. If another user (Fast User Switching) logs on, they get an error that the application is already running. I have tried disabling auto-start in the application's settings and creating a batch file with something like:
Code:
taskkill /im program.exe /t /f
@start "" "C:\path\program.exe"
I then create a shortcut for the batch file and place the shortcut in the C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup folder.
I think the problem is that some users are not admin.
Is there anyway to kill an application that is running under an admin account when a non-admin user logs on, and then restart the program under the current user?
My Computer
System One
-
- OS
- Win11