Solved

Logon Script

Posted on 2008-06-18
7
210 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
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 …

808 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