Re: Fertige Scripts
- From: Marco Appoldt <marco.appoldt@xxxxxxxx>
- Date: Tue, 28 Mar 2006 23:54:53 +0200
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
.
- Follow-Ups:
- Re: Fertige Scripts
- From: gabriel
- Re: Fertige Scripts
- Prev by Date: Re: Fertige Scripts
- Next by Date: Registry
- Previous by thread: Re: Fertige Scripts
- Next by thread: Re: Fertige Scripts
- Index(es):
Relevant Pages
|