0

As one of the steps for installing CRON daemon for CygWin in Windows, it is worthful (not mandatory on WinXP, but seems to be greatly adviced since Win7) to change (along with some others modifications) the run as property of the just installed CRON service.
This is the GUI method window (sorry, my Windows is in spanish) where I can select any other user (in my example "cygrunsrv", but it could be any other):

The "Run As" property - Executing a service as another account than "system"

I have reviewed the docs, and the sc command does not seem to have that capability. All I found is this option to allow the service to interact with desktop:

sc config servicename type= interact type= own

but it is not the change I am searching for.
Is there a way to get this done via command-line?

1

You should be able to do that using obj= and password= params of sc config
(Maybe it's edition dependent, but I was not able to find any information it is)

Running sc config /? produces following options for me:

CONFIG OPTIONS: NOTE: The option name includes the equal sign. type= <own|share|interact|kernel|filesys|rec|adapt> start= <boot|system|auto|demand|disabled> error= <normal|severe|critical|ignore> binPath= <BinaryPathName> group= <LoadOrderGroup> tag= <yes|no> depend= <Dependencies(separated by / (forward slash))> obj= <AccountName|ObjectName> DisplayName= <display name> password= <password>

Full description here: http://technet.microsoft.com/en-us/library/cc990290.aspx

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.