Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Remotely start an application in users context


Recommended Posts

Posted

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?

Posted

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.

Posted
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!

 

Cheers, I'll have a look at that later or tomorrow and report back.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...