Run exe, etc for all users (runas=currentuser)

Hello,

I’m not sure of the logic behind setting this up. Clearly it will run as the current user (and know the relevance has to account for a logged on user), but unsure how to set up this action so it will run for every user of the system.

For instance:

  1. Once it runs once for a given user, how will it apply to other users who log on later? The action would be left open of course, but don’t know how to get it to run again, or recognize, it hasn’t yet run for a different user.

What I’m trying to do is get a new Desktop Theme to apply for all users. I have the theme ready and available in “Personalize”, but to get it to become the active theme rundll32.exe can be run to do that without requiring a logoff:

“rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk, @TheMes /Action:OpenTheme /file:”“C:\Windows\Resources\Themes\HHMX.deskthemepack”

But don’t know how to set it up so it applies to all users of a system.

Thanks!

Actually I suppose I should first ask if this is even doable, to run something for every user that might log in with the context I’m looking for (new desktop theme for everyone)?

Thinking about it more, something like this is probably best handled through a GPO. Although believe doing this through a GPO would lock down the theme.

I know this is kind of old but there is an answer to this ,
there are 2 things you can do that I can think of:

  1. Have the task run only when a user is logged in and then have it check for a value of some sort in the action script (I think you might be able to key it into the relevance these days but I am not sure) … and then execute the command as the current logged in user (run as current user).
  2. the other option that comes to mind would be to set a runonce into the registry with the command. I don’t know if doing it for the default user will then execute it for each user that logs in or if you need to load the registry for each user and then add it to each of the user accounts that is on the machine … either way, it can be done.