The second method does not work, I used Procmon.exe (from sysinternals
suite) to trace what path of torrc that tor use while running as a nt
service, the result is it is same as running in normal mode, under
C:\Documents and Settings\Administrator\Application Data\Tor (I am
using tor expert bundle, so there is no Vidalia) tor read it.The bad
thing is it does not actually using values in it. I have granted full
permission of this folder to the account SERVICE, It really like a
bug...

I will try the register editing method later. Thanks.


Best.

On Tue, Sep 20, 2011 at 2:49 PM, Justin Aplin <jap...@gmail.com> wrote:
> On Sep 20, 2011, at 10:21 AM, Moses wrote:
>
>> I've tried this but with no luck. The problem is, after running either
>>> tor --service install -option -f "C:\blah\torrc"
>> or
>>> tor -install -option -f "C:\blah\torrc"
>>
>> The "Path to executable:" of "Tor Win32 Service Properties" in Services.msc 
>> is
>> "c:\pathoftor\tor.exe" --nt-service
>> without parameter instead of
>> "c:\pathoftor\tor.exe" --nt-service "-f" "C:\blah\torrc" discussed in
>> that archived post. The "-option -f" parameter is just ignored.
>
> Honestly, I haven't messed with service installation since that post was 
> made; I imagine the installation process has been changed. I don't have a 
> Windows computer handy to mess around with the new versions, but if you're 
> feeling adventurous, you could add the parameters in manually by going to the 
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tor key in the registry, 
> finding the entry that contains the --nt-service tag, and adding "-f" 
> "C:\blah\torrc" to the tail end of it. Alternatively, you could guess where 
> Tor is looking for the torrc (probably Application Data\Vidalia in the 
> service account's home directory) and try placing a copy of your torrc there.
>
> ~Justin Aplin
>
>
>> On Tue, Sep 20, 2011 at 1:47 AM, Justin Aplin <jap...@gmail.com> wrote:
>>>
>>> Windows uses a special account, with it's own home directory and separate 
>>> set of environmental variables, to run NT services. Odds are, when you 
>>> start the service, tor has no idea where your torrc is, and is dropping to 
>>> "reasonable default" values. This is why the default ORPort of 9050 is 
>>> being used.
>>>
>>> The trick is declaring a path to the torrc you want to use in the service 
>>> invocation (using the -f flag), making sure the SERVICE account has 
>>> permission to read the torrc (which could be an issue if it's in one of 
>>> your personal home folders), and making sure DataDirectory is declared in 
>>> your torrc (to ensure the same keys are being used every time).
>>>
>>> This is covered in a bit more detail in this archive thread: 
>>> https://lists.torproject.org/pipermail/tor-relays/2010-June/000381.html
>>>
>>> ~Justin Aplin
>>>
>>> _______________________________________________
>>> tor-talk mailing list
>>> tor-talk@lists.torproject.org
>>> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk
>>>
>> _______________________________________________
>> tor-talk mailing list
>> tor-talk@lists.torproject.org
>> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk
>
> _______________________________________________
> tor-talk mailing list
> tor-talk@lists.torproject.org
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk
>



-- 
"I may not agree with what you say but I will defend to the death your
right to say it"
_______________________________________________
tor-talk mailing list
tor-talk@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk

Reply via email to