Logon Script

we have a windows 2000 domain controller and I have setup a logon script (.vbs) under profile on my account in AD. The path I used is \\machinename\netlogn\login.vbs.
I tried running the scrip by itself and the script is working fine. Not sure why its not working when I login to my computer using the network credentails..Here is the script I am using.

Const HKEY_CURRENT_USER = &H80000001

strComputer = "."
Set objReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Internet Explorer\Main"
ValueName = "Start Page"
strValue = "http://testhomepage.com"
objReg.SetStringValue HKEY_CURRENT_USER, strKeyPath, ValueName, strValue

Who is Participating?
purplepomegraniteConnect With a Mentor Commented:
The setting you are trying to change can be controlled from Group Policy.  This would be a much better solution.  You can also run logon scripts using group policy - but there is no point if a policy already exists to do what the script would do.

Group Policy allows you to control many aspects of Internet Explorer, including the home page (which your script sets).
add a pause to see what error is generated.
arsmed840Author Commented:
I added..
WScript.Sleep(1000)..I didnt see any messages. I am not sure if it is even running the script...
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

That could be the problem, how are you implementing the login script?
arsmed840Author Commented:
In the AD, i put the script on the user profile: under profile tab and  under logon script.
Can the user access the path where the login script is stored?

Details for group policy are here, it would be worth a look: http://technet.microsoft.com/en-us/windowsserver/grouppolicy/default.aspx
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.