Re: Fertige Scripts
- From: gabriel <gabriel@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 29 Mar 2006 01:42:01 -0800
Danke Marco
hat prima geklappt!
Gruss Gabriel
"Marco Appoldt" schrieb:
Am 28.03.2006 10:51 schrieb gabriel:.
Ich bin leider nicht so sehr der Scripter, möchte aber gern ein
Anmelde-Script, welches überprüft in welcher Gruppe ein User ist und danach
die entsprechenden Laufwerke mountet. Da wir ziehmlich viele Gruppen haben
wäre es natürlich cool wenn das alles über ein Script läuft und ich nicht pro
Gruppe eins schreiben muss.
Hallo!
Das gehört zwar nicht direkt zu WSH aber im Windows Server 2003 Resource
Kit gibt es ein nettes kleines Tool, das genau diese Anforderung
erfüllt. Das Tool heißt "IfMember".
"User Membership (IfMember) is a command-line tool that checks whether
or not the current user is a member of a specified group. It is
typically used in Windows logon scripts and other batch files."
Batch-File:
-----------------------------------
echo off
ifmember hr
if errorlevel 1 goto hr
ifmember marketing
if errorlevel 1 goto marketing
ifmember administrators
if errorlevel 1 goto administrators
goto end
:hr
net use * \\server1\hr_share$
goto end
:marketing
net use * \\server1\marketing_share$
goto end
:administrators
net use * \\server1\admin_share$
goto end
:end
Exit
-----------------------------------
--
Grüße
Marco Appoldt
- References:
- Re: Fertige Scripts
- From: Marco Appoldt
- Re: Fertige Scripts
- Prev by Date: Re: Fertige Scripts
- Next by Date: Benutzergruppe von User abfragen
- Previous by thread: Re: Fertige Scripts
- Next by thread: Registry
- Index(es):
Relevant Pages
|