Re: Login Script
- From: Kevin <Kevin@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 13 Feb 2007 14:04:00 -0800
Some are authenticating over a LAN and others are authenticating over a WAN.
It happens in both cases. For the ones going over the WAN, they are using a
DC over the WAN as well.
There are no other scripts running at the same time.
"Jeffery Hicks" <"jhicks[at]SAPIEN.com" wrote:
On Mon, 12 Feb 2007 10:20:01 -0800, Kev wrote:.
Hi,
I am new to scripting, and have created a login script that runs under a
Group Policy. The problem that I am having is that sometimes when a user logs
in the script seems like it is not running. The user just gets their desktop
background picture and no icons, taskbar, etc. If they press ctrl+Alt+Delete
and logoff and then back on the script runs and all of the icons appear. I
have done all of the updates for the computer as well as windows, and also
checked dns problems. So I think it might have something to do with the
script. Here is what the script looks like, any ideas would be appreciated.
Thanks,
Kevin.
Const GUARDIANSHIP_GROUP = "cn=guardianship"
Const RESOURCES_GROUP = "cn=resources"
Const ADMIN_RUPERT = "cn=rupert admin"
Const ADMIN_GUARDIANSHIP = "cn=guardianship admin"
Set WSHShell = CreateObject("WScript.Shell")
Set oFSO = Wscript.CreateObject ("Scripting.FileSystemObject")
strDsk = WshShell.SpecialFolders ("Desktop")
strshortcut = strDsk & "\Usignin.lnk"
If Not oFSO.FileExists (strshortcut) Then
SET oUrlLink = WshShell.CreateShortcut (strshortcut)
oUrlLink.TargetPath = "http://w2kex-van1-1/usignin/"
oUrlLink.Save
End If
Set oFSO = Wscript.CreateObject ("Scripting.FileSystemObject")
strDsk = WshShell.SpecialFolders ("Desktop")
strshortcut = strDsk & "\DTS.lnk"
If Not oFSO.FileExists (strshortcut) Then
SET oUrlLink = WshShell.CreateShortcut (strshortcut)
oUrlLink.TargetPath = "https://dts.gov.bc.ca"
oUrlLink.Save
End If
Set wshNetwork = CreateObject("WScript.Network")
wshNetwork.MapNetworkDrive "h:", "\\w2kfs-van1-1\users\" & wshNetwork.UserName
wshNetwork.MapNetworkDrive "t:", "\\w2kfs-van1-1\templates"
set objNetwork = CreateObject ("WScript.Network")
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
colGroups = CurrentUser.MemberOf
If IsEmpty(colGroups) Then
strGroups = ""
ElseIf TypeName(colGroups) = "String" Then
strGroups = LCase(colGroups)
Else
strGroups = LCase(Join(colGroups))
End If
If Instr(strGroups, GUARDIANSHIP_GROUP) Then
wshNetwork.MapNetworkDrive "g:", "\\w2kfs-van1-1\guardianship share"
objNetwork.AddWindowsPrinterConnection "\\vacfss-rupert\Guardianship1"
objNetwork.AddWindowsPrinterConnection "\\vacfss-rupert\Guardianship2"
End If
If Instr(strGroups, RESOURCES_GROUP) Then
wshNetwork.MapNetworkDrive "r:", "\\w2kfs-van1-1\resources share"
objNetwork.AddWindowsPrinterConnection "\\vacfss-rupert\Resources1"
End If
If Instr(strGroups, ADMIN_RUPERT) Then
wshNetwork.MapNetworkDrive "i:", "\\w2kfs-van1-1\rupert-admin"
wshNetwork.MapNetworkDrive "s:", "\\w2kfs-van1-1\reception"
objNetwork.AddWindowsPrinterConnection "\\vacfss-rupert\Resources1"
objNetwork.AddWindowsPrinterConnection "\\vacfss-rupert\Guardianship2"
objNetwork.AddWindowsPrinterConnection "\\vacfss-rupert\DP-4510"
End If
I don't see any red flags in your script. Are the clients who have
problems on the LAN or authenticating over a WAN? Do they authenticate to a
local DC or one over a WAN? If they are connecting over slow links,you may
have other Group Policy processing issues as well.
Are there other computer startup or user logon scripts running at the same
time?
--
Jeffery Hicks
SAPIEN Technologies - Scripting, Simplified. www.SAPIEN.com
VBScript & Windows PowerShell Training -
www.ScriptingTraining.com/classes.asp
Windows PowerShell? - www.SAPIENPress.com/powershell.asp
blog: http://blog.SAPIEN.com
blog: http://jdhitsolutions.blogspot.com
- References:
- Login Script
- From: Kev
- Re: Login Script
- From: Jeffery Hicks
- Login Script
- Prev by Date: Re: Paging disconnected recordset
- Next by Date: Re: Login Script
- Previous by thread: Re: Login Script
- Next by thread: Question about system performance
- Index(es):
Relevant Pages
|