views:

160

answers:

2

Hi Guys,

I have a .Net app that i install and set to run at Startup. The installer also creates a user that has write permissions to the appropriate application folders and registry sections, preventing the currently running user from modifying the restricted areas.

However, i am unable to figure out how to run the application under a different user. It's not a Service (although that is a possibility). I'm really trying to figure out how to do the following:

  • Start an application on boot as a different user.
  • Install a service to start on boot, as a different user.

Can anyone point me in the right direction?

Regards

Tris

A: 

You could use the task scheduler (on recent versions of Windows, at least–no, not on XP). It includes an "on startup" trigger and you can set a program to run as a different user.

Joey
A: 

With respect to services, you specify the user they run as when you install one.

To start an app as someone else, you could create a batch script that launches your app with the RUNAS command, though I believe you are prompted for a password so it may not be what you're after.

Austin Salonen