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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting the homepage with a logon script

Status
Not open for further replies.

TSMJ

MIS
Nov 27, 2002
83
Hi
Can someone tell me how to set the homepage of 2K pro workstations when they log on using a script (preferably VBS)? I have got the following code (which works perfectly by itself, but when I put it in with the other logon scripts on the server and add it in the group policy (leaving parameters blank, I might add) it malfunctions on the workstation. When a user logs on, an IE window opens up and looks for the URL " not setting the homepage at all.

Heres the code: (192.168.0.1 is the webserver)

'vb script to create homepage
Option Explicit
Dim WSHShell, RegKey
Set WSHShell = CreateObject("WScript.Shell")
RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\"
WSHShell.RegWrite regkey & "Start page", "
So - can anyone give me some advice? The script is not in the NETLOGON dir, but neither are any of the other scripts we run.

Cheers guys!
 
Oh, and another thing :) - how do you get scripts to execute on particular machines? I have an 'install printer' vbs script which generates errors on the machine with the printer installed but works fine on any client connecting to it via the script... any user logging onto the print server workstation locally gets the printer setup automatically (windows does it by itself) so theres no need for the script to run on that PC at all.

Thanks.
 
How are you calling the script? You can't use a .VBS as a logon script, you have to call it from a .BAT file that is the logon script.

Specify LOGON.BAT as the login script in ADU&C. LOGON.BAT should look like this:

CSCRIPT.EXE homepage.vbs
 
Since you are using Group Policy, There's a setting in it where you can Customise the Homepage. It's under User Config -> Windows Settings -> Internet Explorer Maint -> Important URLs. It should work for your W2k Pro clients.
 
Thanks guys - both those answers were exactly what I needed - everything is now running 100% smoothly... I had read all about .bat files and calling VBS scripts, but I thought that as the Group policy accepted a VBS logon script it was meant to work by itself (and some did) but now it works perfectly.

Thanks again [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top