Einzelnen Beitrag anzeigen

Reinhard Kern

Registriert seit: 22. Okt 2006
772 Beiträge
 
#9

Re: Über einen Dienst auf ein Netzwerklaufwerk zugreifen

  Alt 5. Okt 2009, 09:46
Zitat von Ralf Meyer:
Wir haben es bisher probiert den Dienst unter dem Administratorkonto laufen zu lassen. Es scheint aber, dass der Dienst in diesem Moment die Laufwerkszuordnung nicht hat.

Gruß Ralf
Hallo,

2 Lösungen aus dem Netz:
1.
Are you using Active Directory, if so, right click on the computers OU that you want to map drives to, go to properties, group policy and new. Create a policy in 'templates', 'start up' to map your drives. These will then be mapped every time the machine is switched on.

2.
The helper process approach can be pretty simple: just create a new service that maps the drive and starts the 'real' service. The only things that are not entirely trivial about this are:

The helper service will need to pass on all appropriate SCM commands (start/stop, etc.) to the real service. If the real service accepts custom SCM commands, remember to pass those on as well (I don't expect a service that considers UNC paths exotic to use such commands, though...)

Things may get a bit tricky credential-wise. If the real service runs under a normal user account, you can run the helper service under that account as well, and all should be OK as long as the account has appropriate access to the network share. If the real service will only work when run as LOCALSYSTEM or somesuch, things get more interesting, as it either won't be able to 'see' the network drive at all, or require some credential juggling to get things to work.

Um es zu wiederholen: Administrator ist für einen Service das ungeeignetste Konto.

Gruss Reinhard
  Mit Zitat antworten Zitat