Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Logon Scripts

Posted on 2003-03-06
7
Medium Priority
?
318 Views
Last Modified: 2013-12-28
I am trying to fnd out how to write a script where I am have certian items run for one department of users and another for a different department.  I setup groups in my Domain User manager for each department.  Can I setup different logon scripts for each group or is there a way for it to check when when the script is running which group the user is in so it will run the correct batch file???
0
Comment
Question by:ejunge
5 Comments
 
LVL 20

Expert Comment

by:Dufo G. Belski
ID: 8082528
You can use the ifmember.exe tool that is in the resource kit.  It is described here:

http://www.winnetmag.com/Articles/Index.cfm?ArticleID=5869

Here's another example:

http://www.experts-exchange.com/Operating_Systems/WinNT/Q_10142197.html
0
 

Expert Comment

by:kenny22
ID: 8083552
Try using this as a template and make mofification as necessary
net use j: \\computer name\folder name
net use g: \\computer name\folder name
net use h: \\computer name\folder name
net use i: \\computer name\folder name
net use t: \\computer name\folder name
net use s: \\computer name\folder name
@echo off
REM Sample Windows NT Login Script for AVUpdate
REM Please replace "<updateserver>" in this file with the name of
REM   the NT Server designated as you update server.

If "%OS%" == "Windows_NT" goto skip
If NOT "%WINBOOTDIR%" == ""  goto 95

echo Running AVupdate using  WIN3x syntax
net use v: \computer name\cheyupd$
v:\avupdate.exe
net use v: /d
goto skip


:95
REM
REM Run AVupdate using WIN95 syntax
REM
echo Running using WIN95 syntax
\\computer name\cheyupd$\avupdate.exe

:skip
echo Thank you for using AV-Update

0
 
LVL 1

Expert Comment

by:tc982
ID: 8086899
There is a even more handy tool, if you have problems with writing complex scripts.

Just go to www.scriptlogic.com

this program will allow you to have in one script the possibilty to create outlook profiles, settings, mapped network drives, add programs just once, or ... ... ...

this is a must for easy working with logon scripts!

check it out ( no I do not have any shares in the company, who would have shares anyway these days! )
0
 
LVL 1

Accepted Solution

by:
CPscripter earned 200 total points
ID: 8196851
Setting different scripts for different groups is easy. In NT4 Usrmgr select "Select Users" from the "Users" menu. Find and select the group that you want to set the script for and click on the "Select" button. You can then press Enter and edit the logon script setting for all of the users at once.

Note that the select users option adds to any current selection you have. To avoid problems, you should "Deselect" Domain Users before selecting your group.

If you want to have a single script, you can use KIX from the resource kit or if you're adventurous, write a script in VB.

Claude
0
 

Assisted Solution

by:SaschaRhein
SaschaRhein earned 200 total points
ID: 8204581
We are using KIXtart (http://www.kixscripts.com/download.asp) and the login script is quite easy.
In the user settings we just point to a batch file, lets call it login.bat.

And this file contains a line like:
call kix32.exe Main.kix

Please bear in mind that the kix32.exe must be in the netlogon folder as well.

And here is an example for the "Main.kix" script:


; === Sync time with server GBWH16 ===
      settime "\\GBWH16"


; === Map folders ===

      IF InGroup("GBWH Users")
         USE H: "\\GBWH16\" + @UserID + "$"
         USE O: "\\GBWH16\Everyone"
         USE P: "\\GBWH16\Programs"
      ENDIF

      IF InGroup("GBHO Display")
         USE G: "\\GBWH16\Display"
      ENDIF


; === Install Printer ===

      IF InGroup ("GBHO Press")
         AddPrinterConnection("\\GBHO01\GB HO Press Colour")
         AddPrinterConnection("\\GBHO01\GB HO Press")
         SetDefaultPrinter("\\GBHO01\GB HO Press")
      ENDIF

EXIT
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
By default Outlook 2016 displays only one time zone in the Calendar. The following article explains how to display two time zones in one calendar view.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question