Solved

Logon Script

Posted on 2008-06-18
7
212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Always backup Domain, SYSVOL etc.using processes according to Microsoft Best Practices. This is meant as a disaster recovery process for small environments that did not implement backup processes and did not run a secondary domain controller that ne…
A hard and fast method for reducing Active Directory Administrators members.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

751 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