Re: logon script error message



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.






.



Relevant Pages

  • Re: logon script error message
    ... userName = WshNetwork.UserName ... acess sysvol and run the script manually. ... The error message refers to the line mapping h: ... Maybe the variable userName is incorrect or undefined. ...
    (microsoft.public.windows.server.general)
  • Re: logon script error message
    ... It is inconsistent. ... reproduced.In this script: ... userName = WshNetwork.UserName ... Some users have an inconsistent "access denied" error message popping ...
    (microsoft.public.windows.server.general)
  • Re: Simple Problem? ... Please Advise ...
    ... "username" before trying to assign the value to the variable $username. ... If you still get an error message, but the script seems to work as it should, ... is the possibility that you get a function-local array instead of the global one. ...
    (alt.php)
  • Re: VPN CMAK Login script issue
    ... It seems that when I login to my external workstation under a different ... username and password than username and password I authenticate with through ... I'm not able to map drives and am prompted for a password for each ... >> connects and then runs our login script in sysvol. ...
    (microsoft.public.isa.vpn)
  • Re: Form Security
    ... After all this, if no error message has been generated, the form contents are emailed to me. ... I'm no Linux guru, so I don't know what someone could do to cause problems with this script, other than spam me. ... What he's proposing is false security - which is worse than no security ...
    (comp.lang.php)

Quantcast