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):
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?
Best Answer
You should be able to do that using
obj=
andpassword=
params ofsc 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