I want to force other app to quit before launching my application like prompting to close. It seems to me a dead end. I can block keys but not other app running in taskbar
Asked
Active
Viewed 249 times
1
-
Which OS is your app running on? – shashi Oct 14 '16 at 08:14
-
i am using linux x64 – SameerKhan1406 Oct 14 '16 at 08:53
1 Answers
0
You can use shelljs and execute a shell command to get the process ID of the application that you want to close. e.g. see this answer of how to get pid using pgrep
Once you have the PID you can kill that process using process.kill(PID)
This is the first thing you can do inside your app.on('ready', eventHandler) ;
-
You are not getting my problem, i want to stop user to close every window before my app launch since i don't know the current open application how would i close it in the first place. My Task- To stop user from capturing my app activity example- Online Examination prompt you to not close application else test will be closed. I am using nodejs javascipt in electron framework so i have tried kiosk mode but failed(only full window working) since user can swap windows and minimize then i used javascript to block some key combination but still there is minimize window button visible – SameerKhan1406 Oct 15 '16 at 08:00