RE: Logon Script



Hey Jaime,

I'm not a scripting guru so this is what I use in a batch file.

:group1
ifmember group1 (this is where you have a unique group ie Finance)
if not errorlevel 1 goto group2
net use P: \\server\%username%$
net use s: \\server\shared
exit

:group2
ifmember group2
if not errorlevel 1 goto group3
net use P: \\server\%username%$
net use s: \\server\shared
exit

:group3
ifmember group3
if not errorlevel 1 goto done
net use P: \\server\%username%$
net use s: \\server\shared
exit

:done
exit

Let me know if you have anyquestions

"Jaime" wrote:

> I am looking for a script that users can run at logon that will map drives
> and printers. I would like for it to check what group the users belong to
> (global group.."Accounting", "Finance") and then map the corresponding
> drives. We are currently using batch files that are for specific groups and
> I would like to consolidate them into one file for easy maintenance. We have
> no need to keep batch files. We are open to any scripting language.
>
>
> Jaime
>
.



Relevant Pages

  • Re: scripting vs. batch files?
    ... >| I've been using batch files for ages, ... >| client was Windows 2000 or Windows XP. ... >| Can you incorporate scripting syntax in a batch file or should I stop using ...
    (microsoft.public.windows.server.scripting)
  • Re: Is vbscript appropriate tool?
    ... contrast of using vbscript versus batch files for tasks such as the ... actual scripting examples for just about all the basic functions. ...
    (microsoft.public.scripting.vbscript)
  • Re: Network Timeout in Script
    ... > scripting, more batch files. ... The client machine list is editable and pulled from ... > Is there anyway I can change this default timeout for network connections to ...
    (microsoft.public.windows.server.scripting)
  • Re: scripting vs. batch files?
    ... | I've been using batch files for ages, ... | Can you incorporate scripting syntax in a batch file or should I stop using ... are even macros in Kixtart to directly determine the OS without querying the Registry. ...
    (microsoft.public.windows.server.scripting)
  • Re: scripting vs. batch files?
    ... Linn ... > I've been using batch files for ages, ... > Can you incorporate scripting syntax in a batch file or should I stop ... or which are the best books? ...
    (microsoft.public.windows.server.scripting)