Solved

Logon Script

Posted on 2008-06-18
7
211 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

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

Independent Software Vendors: 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!

Question has a verified solution.

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

In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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 …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

685 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