Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Win32 Daemon @INC

by jbert (Priest)
on Jan 07, 2008 at 21:11 UTC ( #660944=note: print w/replies, xml ) Need Help??


in reply to Win32 Daemon @INC

Windows services don't get the same environment as the user who the service is running as would get if they logged in.

For example, the per-user environment variables aren't set. I assume the same is true of drive mappings for that user.

You might have luck executing a "NET USE" from your script prior to accessing the drive letter, but that's really no different from using the UNC path directly.

There may be an invocation which allows services to see this sort of setting - perhaps someone else could chime in if so.

Replies are listed 'Best First'.
Re^2: Win32 Daemon @INC
by Corion (Pope) on Jan 07, 2008 at 21:14 UTC

    Actually, unless nothing else has been specified, the service will run as the system user, and the system user does not even have the permissions to access network resources, be they mapped or unmapped.

    The solution is usually to run the service as another user than the default.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://660944]
help
Chatterbox?
[Corion]: Hi choroba! Yeah, I brought the rain with me from Hamburg
[Corion]: marto: As am I ;) And we got two interested locations for next year, Munich and Cologne maybe, which is great as well. Not Berlin though ;)
[marto]: damn
[choroba]: Munich is kind of close from here
[Corion]: marto: Maybe in three years it'll be Berlin again ;)
[marto]: in 3 years I may be able to go :P
[Corion]: choroba: Both teams will ponder on whether/where/how to organize things. The workshop will be mainly in German though
[Corion]: marto: Hehe ;)
[marto]: my out of working hours time is very scarce at the moment
[marto]: unfortunately for you guys I can still access PM during the day :P

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2017-06-29 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (655 votes). Check out past polls.