Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon scripts...

Status
Not open for further replies.

hudhwk

Programmer
Jan 28, 2003
80
MX
Hi guys,

I have to update a Windows patch on all the clients on my office and the problem is that I don't have experience on logon scripts, also I have 95, 98, NT, NTWS, 2K and XP, and have diferent patches for each version, as you can see, the best way it could be to implement a logon script, but have no idea.

Please help me on this because I have more than 500 PC's and really wish to optimate this process.

Thanks a lot for your comments and I'll be on line to hear from you.

Sincerely,

Daniel Buentello.
 
Logon script is like an autoexec.bat file in dos.
Like autoexec analogy most of the command you can use in login script is the command that will work in the NT prompt.
And again just like the autoexec you will learn as you advance a pretty complex script could be written (for example when variables and conditions are involved)
But for starter let's create something simple - create a bat file that copy a file to local drive.

Next here are the steps you should follow :
1. Copy the bat file to a folder called netlogon. It's a special folder in win nt. Do a web search on it to learn more. You can also name the file with cmd extension which is NT's native script file extension.
2. Open user manager (one of the administrative tools)
3. pick a user (create dummy if you have to) and double click
4. choose profile button
5. Feed in the bat filename you created in step 1 into the field that says "Logon Script Name".

That's it.
Try login with that account and see the effect.
Refine your scripts. When you're satisfied... Do the same with the rest of the users.

TIPS : You can assign different script to different user say one script for win95, one for win xp... one for managers, one for operators... so on.


Hope it helps.


BootSector.
 
Ok,

I'll do that, just a last question my friend, I read that there's a variable named OS usually referenced as %OS% that gives you the OS version, but how can I capture when it's XP or 2k? because in my Windows XP it shows as Windows_NT?

Any idea?
 
For the W2k machines you can deploy the Service Packs from Group Policy:

01. Download the W2KSPn file to a distribution share, or copy it from the Service Pack CD-ROM.

02. Open a CMD prompt and switch to the distribution share folder.

03. Type W2KSPn.exe -x to expand the Service Pack. When prompted for a folder, choose the distribution share folder.

04. You may delete the W2KSPn.exe file.

05. Open the Active Directory Computers and Users snap-in.

06. Expand the tree through the domain where the computers reside and double-click the applicable OU (or the domain).

07. Right-click the object that the policy will be applied to and press Properties.

08. Select the Group Policy tab and press New. Name the Policy W2KSPn Update and press Enter.

09. With W2KSPn Update selected, press Edit.

10. Expand Computer Configuration / Software Settings.

11. Right-click Software installation, press New, and press Package.

12. Browse to the i386\Update folder in the distribution share.

13. Right-click the Update folder and press Open.

14. Right-click Update (Update.msi) and press Open.

15. Verify that the Assigned option is selected in the Deploy Software dialog and press OK.

16. Close the Group Policy snap-in.

17. Press Close on the Group Policy page of the Desktop Properties dialog.

18. Press Exit on the Console menu.

 
If you ultimately want to implement a logon script, try
By the way, its a good idea to keep your clients and workstations similar (better, all the same). This will minimize your administrative tasks. Good luck.
 
hudhwk - Use the "ver" command to determine OS.

ver | find /i "2000"
ver | find /i "4.0"
ver | find /i "xp"





 
Thanks a lot guys!!!

I found your information very usefull, have a great day and be sure that I will use it.

Thanks again.

Sincerely Daniel Buentello
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top