Valhalla Legends Archive

General => General Discussion => Topic started by: Yoni on July 24, 2004, 03:34 PM

Title: Running a program as Admin at startup for regular users (Win2k)
Post by: Yoni on July 24, 2004, 03:34 PM
There is a program that I want run with administrator privileges in the context of an unprivileged user. I want it run at startup (the user's local login), obviously without the user having to type the admin password. How do I do this? Sort of like sudo in *nix except in Windows.
Title: Re:Running a program as Admin at startup for regular users (Win2k)
Post by: cefx- on July 24, 2004, 03:38 PM
They do that here at work.
With programs like FixWelch.exe, etc.

I will ask the right people....
Title: Re:Running a program as Admin at startup for regular users (Win2k)
Post by: Eibro on July 24, 2004, 04:18 PM
You could create a sort of launcher if none such exists. See http://msdn.microsoft.com/library/en-us/security/security/privileges.asp
Title: Re:Running a program as Admin at startup for regular users (Win2k)
Post by: Arta on July 24, 2004, 04:20 PM
runas
Title: Re:Running a program as Admin at startup for regular users (Win2k)
Post by: Yoni on July 24, 2004, 05:42 PM
Quote from: Arta[vL] on July 24, 2004, 04:20 PM
runas
Already thought of that. Unfortunately, it seems that runas requires you to type an admin password every time you run the program, which is exactly what I don't want.

Quote from: Eibro[yL] on July 24, 2004, 04:18 PM
You could create a sort of launcher if none such exists. See http://msdn.microsoft.com/library/en-us/security/security/privileges.asp
Hmm, that URL redirects me to 404 :(
Title: Re:Running a program as Admin at startup for regular users (Win2k)
Post by: cefx- on July 24, 2004, 06:03 PM
Even Sudo requires a password.

Sorry, Yoni, nobody I talked to had any ideas except Arta's suggestion.
Title: Re:Running a program as Admin at startup for regular users (Win2k)
Post by: Adron on July 24, 2004, 06:43 PM
What do you want to accomplish?

One option is to have a "startup script" that is run by the system account when the computer is started. Not when the user logs on though. And a script that runs as administrator won't be accessing the user's stuff anyway - different registry, different mapped drives, etc.
Title: Re:Running a program as Admin at startup for regular users (Win2k)
Post by: Thing on July 24, 2004, 07:30 PM
Scheduled Task set to run at boot time?
Title: Re:Running a program as Admin at startup for regular users (Win2k)
Post by: muert0 on July 24, 2004, 07:37 PM
Tried playin around in msconfig on that account?
Title: Re:Running a program as Admin at startup for regular users (Win2k)
Post by: Yoni on July 24, 2004, 08:11 PM
Quote from: Thing on July 24, 2004, 07:30 PM
Scheduled Task set to run at boot time?
Brilliant! I will try that as soon as the room containing said computer frees itself of sleeping people.

Adron: I don't want the program accessing that user's stuff anyway. It's sort of like an interactive service (has a tray icon and all), except it doesn't install itself as a service.
Title: Re:Running a program as Admin at startup for regular users (Win2k)
Post by: Adron on July 24, 2004, 08:20 PM
Quote from: Yoni on July 24, 2004, 08:11 PM
Adron: I don't want the program accessing that user's stuff anyway. It's sort of like an interactive service (has a tray icon and all), except it doesn't install itself as a service.

Srvany (comes with the resource kit) is a Microsoft-supplied generic service process. It's used for running any application as a service. It sounds like just what you need.
Title: Re:Running a program as Admin at startup for regular users (Win2k)
Post by: Yoni on July 24, 2004, 08:55 PM
Aha! That will work as well. I had known about instsrv.exe, but not about srvany.exe (and I wondered whether instsrv.exe would ever be useful). This KB article explains.

http://support.microsoft.com/default.aspx?scid=kb;en-us;137890 (http://support.microsoft.com/default.aspx?scid=kb;en-us;137890)

Thanks! :)

(Edit: Fixed link)