StickyChopstix Posted April 22, 2018 Posted April 22, 2018 I'm using a server and basically I want to kill all processes named X for every user that has it open and then start the process again at a later time in my script but only for users that had it open in the first place.
Moderators JLogan3o13 Posted April 23, 2018 Moderators Posted April 23, 2018 You would have to use administrative credentials to kill said processes, then you would have to have the users' credentials in order to restart it for their session. Why on earth would you want to do this? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
StickyChopstix Posted April 23, 2018 Author Posted April 23, 2018 (edited) 43 minutes ago, JLogan3o13 said: You would have to use administrative credentials to kill said processes, then you would have to have the users' credentials in order to restart it for their session. Why on earth would you want to do this? When X program has issues, I may have to run a db file (that X will be using) through a cleaner program, but I can't modify the db while it's in use. Naturally, I have to close X in order to clean up the db and then restart it after I'm done. Edited April 23, 2018 by StickyChopstix
Moderators JLogan3o13 Posted April 23, 2018 Moderators Posted April 23, 2018 And I understand (and agree) with everything right up until the point where you restart the process under the users' session. You aren't going to be able to do that programmatically, regardless of the language, without having their credentials - which as an admin you should realize is a huge security risk. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
aa2zz6 Posted April 23, 2018 Posted April 23, 2018 5 minutes ago, JLogan3o13 said: And I understand (and agree) with everything right up until the point where you restart the process under the users' session. You aren't going to be able to do that programmatically, regardless of the language, without having their credentials - which as an admin you should realize is a huge security risk. If he has admin access couldn't he stop the service in Services and start the service at a later time?
StickyChopstix Posted April 23, 2018 Author Posted April 23, 2018 (edited) In that case, I suppose I can work around it by having scripts on each user check for X every 10 minutes (usually how long it takes to finish cleaning up the db), and restart it if process doesn't exist. That just leaves the problem of killing all processes named X for every user. EDIT: I suppose I don't need AutoIt to do these do I? Would a .bat file be able to do the job? Edited April 23, 2018 by StickyChopstix
Danp2 Posted April 23, 2018 Posted April 23, 2018 I would suggest creating a file on the server that would indicate the server has been place in maintenance mode. You could have a script running on the remote PC that monitors for this file and then does the following steps -- Notifies the user and allows them to save their work After a designated period of time, closes the app Continues to display a status window so that the user won't relaunch the app prematurely Reloads the app once the file has been removed Latest Webdriver UDF Release Webdriver Wiki FAQs
Moderators JLogan3o13 Posted April 23, 2018 Moderators Posted April 23, 2018 9 hours ago, aa2zz6 said: If he has admin access couldn't he stop the service in Services and start the service at a later time? You miss the point of his original question; he wanted to restart the service for the users, which would mean launching the process under their sessions (which in turn means having access to their session credentials). "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now