?
Solved

Creating a Log-on script to run on Windows XP machines, and talk to a Windows 2003 server.

Posted on 2005-03-06
12
Medium Priority
?
215 Views
Last Modified: 2010-04-19
Hiya,

I have been asked if I can set up a classroom at a local school of fine.  The classroom currently has 30 machines, and 1 server.  They want all of the machines to be upgraded to Windows XP/2000 pro and I am going to upgrade the server to Windows 2003.  Because there is going to be a difference between the levels of access given between the pupils and staff, I want to create a log-on script that wil map drives, set backgrounds and styles and levels of access, but because I have not used scripts before, I am not sure where to start.

Also, can anyone please tell me how to display the operating system and profile information on the desktop (normall situated in the bottom right hand corner)?

Thanks again
Matt
0
Comment
Question by:leachus2002
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +1
12 Comments
 
LVL 4

Accepted Solution

by:
dwelldon earned 750 total points
ID: 13470604
Firstly, you do not need to use scripts. You need to be using group policies to set all the settings. If you aren't sure what they are then have a look at the following links

Gives an over view of group policy.

http://www.microsoft.com/windowsserver2003/techinfo/overview/gpintro.mspx 

0
 
LVL 4

Expert Comment

by:dwelldon
ID: 13470618
0
 

Author Comment

by:leachus2002
ID: 13470777
Thanks for all of the info.

I have been reading on of my books and have come up with the following script:

@echo off
echo.
Echo Welcome to the ADSL domain
Echo.
Call :Message
Rem Map network drives, delete any connections first
Net use /d /y
Rem map network drives
Net use m: %logonserver%\COMMON
Net use l: %logonserver%\APPLICATIONS
Echo.
Echo. ****Hello %USERNAME%! Welcome to the %USERDOMAIN% Domain!
Echo.
Echo.
Goto :EOF
:Message
rem display system message
echo. ****                                           ****
echo. **** The network will be down over the weekend ****
echo. **** Please save your work and shutdown        ****
echo. **** promptly at 5PM on Friday                 ****
echo. ****                                           ****

but I cannot get it to run,  I have placed it in the:

C:\windows\SYSVOL\sysvol\DOMAIN.com\scripts\logon.cmd directory but when I place that path into the profile, it still won't run.

Any ideas??

Thanks
Matt
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 85

Expert Comment

by:oBdA
ID: 13470920
The path is okay; specify the logon script's name only in the user's profile, no path; the clients know where to look.
As for the system information, have a look at Sysinternals's BgInfo at http://www.sysinternals.com/ntw2k/freeware/bginfo.shtml
You can copy it (and a configuration file) into the netlogon share and use it from there.
As for creating different mappings according to group membership, install the W2k3 Resource Kit Tools on a Server 2003 or XP machine, then copy ifmember.exe into the netlogon share as well.
You can use it like that, for example (note that ifmember returns errorlevel 1 if the user *is* a group member):

ifmember %UserDomain%\StaffGroup
if not errorlevel 1 goto EndStaffMappings
net use S: \\SomeServer\SomeStaffShare
:EndStaffMappings

ifmember %UserDomain%\PupilGroup
if not errorlevel 1 goto EndPupilMappings
net use P: \\SomeServer\SomePupilShare
:EndPupilMappings

Windows Server 2003 Resource Kit Tools
http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
0
 

Author Comment

by:leachus2002
ID: 13471043
Thanks for the BGinfo program,  but it only seams to display information when it is running, which can cause a pain.  I thought that there was a method where you can display PC information without necessarally running a program?

Thanks for the info with the script, it is displaying the network drive for me now, but I am not getting the cmd box up when you log in.

We are getting there :)

Matt
0
 
LVL 85

Expert Comment

by:oBdA
ID: 13471105
For BgInfo, you need to configure and save a configuration file (.bgi) with the settings you want to be displayed on the desktop.
Then put it into the netlogon share as well, and call
bginfo.exe %logonserver%\netlogon\ConfigFile.bgi /timer:0
That should create a background image with the configuration.

As for the command window during logon, if that's an Activ Directory domain, there's a group policy someplace (I don't remember where, and can't look it up at the moment, sorry) where you can force the logon window to be displayed, instead of running in the background.
0
 

Author Comment

by:leachus2002
ID: 13471120
OIC - thats great, thankyou very much, could you let us know if you do find out about the policy please?

Will BGinfo also work on PC's running on a workgroup?  If so, where should you place the fine then?

Sorry to be a pain

Matt
0
 
LVL 85

Expert Comment

by:oBdA
ID: 13471133
Just look for the policy; it should be someplace in the logon or network settings.
BgInfo's exe can of course be copied locally to a machine and then be started using the startup folder.
0
 
LVL 20

Expert Comment

by:Lazarus
ID: 13471198
I would suggest not to use a .Bat or an ifmember login script. Use and individual VBS script for each User group and use that instead, it's faster and safer.
You have alot of power to provide individual settings from the policeis in an AD enviroment, so definatley use those.

an example of a VB login script would be:

Use this and edit the path

Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "I:", "\\Server\Public"
WshNetwork.MapNetworkDrive "J:", "\\Server\Share"


Then just save it as  groupname.vbs
the add it to the groups loging script.

change the path for each group you accordingly

You can change your wallpaper seetings and such thru your Group Policy Editor in:
USER CONFIGURATION-> ADMINISTRATIVE TEMPLATES->DESKTOP->ACTIVE DSKTOP

You will have to have diffrent OU Policies to accomplish what you want though. One for Staff the other for Students.
0
 

Author Comment

by:leachus2002
ID: 13471582
Thanks for all of the replys guys, but the code:

ConfigFile.bgi /timer:0

doesn't seam to want to work - because I am using a workgroup, I have created a bat file to run on start-up, and even though the file runs, it stil gives a 10 second countdown........so, back to you :)
0
 
LVL 85

Expert Comment

by:oBdA
ID: 13471704
Works fine for me, workgroup or domain. Are you specifying the path to the config file? If not, do so.
Start it with /? to get a list of the arguments; you can create a logfile as well.
0
 
LVL 20

Expert Comment

by:Lazarus
ID: 13472707
With 30 computers and a Server with what you want to be doing I really feel that you should be using a DOMAIN with AD versus a WorkGroup. You'll be limiting yourself alot and have almost not control over the function of the client computers unless you go to each computer on an individual basis to setup things.

My opinion anyways.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
Learn about cloud computing and its benefits for small business owners.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

801 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