CHiLL Posted November 1, 2011 Posted November 1, 2011 Hey. I'm trying to make a vbs script to kill explorer.exe (this bit works), and then start it again (this bit I can't do). However it must run in the context/with permissions of the user that is logged on. (Can be a random user) Explorer.exe crashes fairly often on our old machines, and restarting the application remotely works, however an automated solution would be ideal. At the moment we use pskill.exe to kill explorer on the remote machine, but NetSupport's "Execute at client" to start it again, and it loads as that user logged on. However I cannot replicate this using PsTools or any other way in my knowledge. Can anyone help?
sonofsanta Posted November 1, 2011 Posted November 1, 2011 Can PsExec use the %username% variable with the -u flag? Or will it pick up the username running psexec rather than the remote user? Although presumably there is a way of doing it automatically - I've never investigated the difference but sometimes after killing explorer it restarts itself, where sometimes it needs explicitly calling again from task manager. So there should be something to get it to restart when it's died.
Arthur Posted November 1, 2011 Posted November 1, 2011 powershell.com/cs/blogs/tobias/archive/2011/03/13/executing-code-on-behalf-of-someone-else.aspx 1
CHiLL Posted November 1, 2011 Author Posted November 1, 2011 Can PsExec use the %username% variable with the -u flag? Or will it pick up the username running psexec rather than the remote user? Although presumably there is a way of doing it automatically - I've never investigated the difference but sometimes after killing explorer it restarts itself, where sometimes it needs explicitly calling again from task manager. So there should be something to get it to restart when it's died. Using the -u switch isn't worth it for me, as I'd have to type their username, and I believe I'd require their password too. It'd be good if it just ran it as the random user who is logged on. Some of the switches do load explorer.exe as myself, which is no good as I'm an administrator! powershell.com/cs/blogs/tobias/archive/2011/03/13/executing-code-on-behalf-of-someone-else.aspx Cheers, I'll have a look at that later or tomorrow and report back.
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