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

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 220
  • Last Modified:

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

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
leachus2002
Asked:
leachus2002
  • 4
  • 4
  • 2
  • +1
1 Solution
 
dwelldonCommented:
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
 
dwelldonCommented:
0
 
leachus2002Author Commented:
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
oBdACommented:
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
 
leachus2002Author Commented:
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
 
oBdACommented:
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
 
leachus2002Author Commented:
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
 
oBdACommented:
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
 
LazarusCommented:
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
 
leachus2002Author Commented:
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
 
oBdACommented:
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
 
LazarusCommented:
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now