Solved

Logon Script

Posted on 2008-06-18
7
207 Views
Last Modified: 2013-11-26
Hi,
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

0
Comment
Question by:arsmed840
  • 3
  • 2
  • 2
7 Comments
 
LVL 10

Expert Comment

by:0xSaPx0
ID: 21817488
add a pause to see what error is generated.
0
 

Author Comment

by:arsmed840
ID: 21817552
I added..
WScript.Sleep(1000)..I didnt see any messages. I am not sure if it is even running the script...
0
 
LVL 10

Expert Comment

by:0xSaPx0
ID: 21817719
That could be the problem, how are you implementing the login script?
0
 

Author Comment

by:arsmed840
ID: 21817804
In the AD, i put the script on the user profile: under profile tab and  under logon script.
0
 
LVL 10

Expert Comment

by:0xSaPx0
ID: 21817837
Can the user access the path where the login script is stored?

0
 
LVL 24

Accepted Solution

by:
purplepomegranite earned 500 total points
ID: 21817842
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).
0
 
LVL 24

Expert Comment

by:purplepomegranite
ID: 21817844
Details for group policy are here, it would be worth a look: http://technet.microsoft.com/en-us/windowsserver/grouppolicy/default.aspx
0

Join & Write a Comment

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Resolve DNS query failed errors for Exchange
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now