Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 03-25-2004, 06:10 PM   #1 (permalink)
 
Newb Techie

Join Date: Mar 2004

Posts: 5

Saxis

Question Login Scripts

Hey all,

I manage a simple domain at my work involving a PDC, a BDC/Exchange Server and a Web server. We have several shares on these servers and just 1 simple login script from our PDC that installs printers. I am a complete scripting newb, but I want to add at least 2 new scripts. First I want to add a script that will either edit or copy a new line into our clients' "hosts" files, becuase Watchguard Fireboxes will not route our Website from the inside. In the second script I want to create links too all our client users desktops to a portion of our website. Our client users are mainly clerical staff and do not have the time, or knowledge to navigate to the site. I've done alot of searching for sample scripts with no luck. Keep in mind I do not know much about scripting myself!

Thanks in advance!
Saxis is offline  
Old 03-26-2004, 05:10 PM   #2 (permalink)
office politics's Avatar
 
It's all just 1s and 0s

Join Date: Jan 2004

Location: in the lab

Posts: 4,410

office politics will become famous soon enough

Default

what server os?
office politics is offline  
Old 03-26-2004, 05:13 PM   #3 (permalink)
 
Newb Techie

Join Date: Mar 2004

Posts: 5

Saxis

Default

We are running Win 2000 Servers and XP Pro/2000 clients.
Saxis is offline  
Old 03-27-2004, 12:52 AM   #4 (permalink)
HoLoCroN's Avatar
 
Monster Techie

Join Date: Mar 2004

Location: Plant City, FL

Posts: 1,304

HoLoCroN is on a distinguished road

Default

This is actually not that difficult to accomplish.

Objectives:

1) Automate the update of hosts files on client PC's.
2) Create a URL shortcut on your users desktop.


1)

What you can do is create a hosts file with all of the changes you need and save it on your server somewhere. The script will copy the "master" hosts file and overwrite the hosts file on the local PC's.

Location of hosts file:
On WinXP - C:\Windows\system32\drivers\etc
On Win2k - C:\WINNT\system32\drivers\etc

You can use the %systemroot%\system32 variable to make the script work for both OS.

This is what the script should say:

copy \\ServerName\Share\hosts %systemroot%\system32\drivers\etc


2)

You should create a shortcut of the webpages (intranet pages) you would like your users to have on their desktops.

Copy those shortcuts in a network share (make sure everyone has proper rights and priviledges to the share)

The script should have the following to achieve this.

copy \\ServerName\Share\*.* \\%USERPROFILE%\desktop



I attached a .txt file with the basic script that you will need. You will have to make a few changes. First, you will have to enter the correct server share info. Then you will have to rename the file from logon.txt to logon.bat

The next step would be to add the logon.bat as part of the users profile in the AD user manager.



Its allot of stuff to assimilate but give it a shot.
HoLoCroN is offline  
Old 03-27-2004, 02:19 PM   #5 (permalink)
HoLoCroN's Avatar
 
Monster Techie

Join Date: Mar 2004

Location: Plant City, FL

Posts: 1,304

HoLoCroN is on a distinguished road

Default

Ooops... I meant a .zip file
Attached Images
 
HoLoCroN is offline  
Old 03-29-2004, 11:44 AM   #6 (permalink)
HoLoCroN's Avatar
 
Monster Techie

Join Date: Mar 2004

Location: Plant City, FL

Posts: 1,304

HoLoCroN is on a distinguished road

Default

Any luck with this?
HoLoCroN is offline  
Old 03-29-2004, 11:52 AM   #7 (permalink)
 
Newb Techie

Join Date: Mar 2004

Posts: 5

Saxis

Default

Thankyou for your help HoLoCroN! I have not had a chance to test this yet. I'll let you know how it turns out as soon as I can!

Thanks again!
Saxis is offline  
Old 03-30-2004, 03:05 PM   #8 (permalink)
 
Newb Techie

Join Date: Mar 2004

Posts: 5

Saxis

Default

I have one problem with the batch file.

When it runs, the host file copies fine, but the Internet shortcut comes back as "syntax error.." I'm sure it is something to do with the file extension. When I take the extension off, it returns "..cannot find specified file.."

Other than that problem, I'm not sure the hosts file is actually being copied due to security privleges of clients. I don't think they will be allowed to alter system files. Is there a simple solution to either of these??

Thanks
Saxis is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On