Re: logon script error message
- From: Ryan Hanisco <RyanHanisco@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 10 Nov 2007 06:30:01 -0800
Is this broken across the board, or is it for just some users -- more to the
point, is it consistently broken for those users or does it ever work for
them?
--
Ryan Hanisco
MCSE, MCTS: SQL 2005, Project+
http://www.techsterity.com
Chicago, IL
Remember: Marking helpful answers helps everyone find the info they need
quickly.
"khuizhang" wrote:
Thanks i will try that on some test users first..
"Pegasus (MVP)" wrote:
Being sure is not enough. Since you have a problem, you
must consider all possibilities, even the one of an incorrect
or missing user name. That's what trouble-shooting is all
about.
"khuizhang" <khuizhang@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:666342B0-B3EB-4682-9C59-70945A872B67@xxxxxxxxxxxxxxxx
username is intended to be the one logged on. I am sure it every user has
its
own folder. and the problem is the message is inconsistent and cannot be
reproduced.In this script:
userName = WshNetwork.UserName
"Pegasus (MVP)" wrote:
"khuizhang" <khuizhang@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:08B3CF5F-0138-4E7B-BB17-CFE7D68532B8@xxxxxxxxxxxxxxxx
Hi guys,
Some users have an inconsistent "access denied" error message popping
up
when they logon. I have done the following:
1) under user logon, acess sysvol and run the script manually. it
works,
which means user permission is fine.
2) checked time service and it is working fine.
I have the script below:
Set WshNetwork = Wscript.CreateObject("WScript.Network")
Set WshShell = WScript.CreateObject("WScript.Shell")
Set FileSysObj = CreateObject("Scripting.FileSystemObject")
userName = WshNetwork.UserName
' Map drives
if FileSysObj.DriveExists("y:") = true then
wshNetwork.RemoveNetworkDrive
"y:"
if FileSysObj.DriveExists("g:") = true then
wshNetwork.RemoveNetworkDrive
"g:"
if FileSysObj.DriveExists("h:") = true then
wshNetwork.RemoveNetworkDrive
"h:"
wshNetwork.MapNetworkDrive "g:", "\\fileserver\common02", false
wshNetwork.MapNetworkDrive "h:", "\\sbsserver\users\" & userName,
false
'Map Shared network printers
WshNetwork.AddWindowsPrinterConnection "\\library\hp_north"
The error message refers to the line mapping h: drive.
Could any one kindly help me out?
TIA,
Maybe the variable userName is incorrect or undefined. Add the line
wscript.echo "User Name=" & userName
underneath the problem line so that you can see what it is.
- Follow-Ups:
- Re: logon script error message
- From: khuizhang
- Re: logon script error message
- References:
- Re: logon script error message
- From: Pegasus \(MVP\)
- Re: logon script error message
- From: Pegasus \(MVP\)
- Re: logon script error message
- From: khuizhang
- Re: logon script error message
- Prev by Date: Re: Windows Connection disconnection issue
- Next by Date: Re: Server 2003 Standard .bkf file issue
- Previous by thread: Re: logon script error message
- Next by thread: Re: logon script error message
- Index(es):
Relevant Pages
|