Avatar of Data-Base
Data-Base
Flag for Norway asked on

Mapping drives problem on boot !!!!

hello,

we have win2003 servers and Windows XP clients.

we use ScriptLogic 7

it was just working fine. but suddenly before few days the drives can not be mapped any more.

we can not find out why !?! the printers getting mapped OK

only the drive

if I just use the path for the drive in explorer it just work OK and we can see all the files with no problems

so we run a script that will map the drives

and we get this error message
http://img72.imageshack.us/img72/6712/errorzn8.png

the script code is

Dim Network
Set Network = CreateObject("Wscript.network")

Network.MapNetworkDrive "H:", "\\STORAGE\StudentsPersonal$\%username%\" ,true
Network.MapNetworkDrive "I:","\\STORAGE\StudentsPublic$\%username%\" ,true
Network.MapNetworkDrive "J:", "\\STORAGE\StaffPublic$\" ,True
Network.MapNetworkDrive "K:", "\\STORAGE\StudentsPublic$\" ,True
Network.MapNetworkDrive "P:", "\\STORAGE\Programs$\" ,True

Network.AddWindowsPrinterConnection "\\DC\CR01$"

oh, and I did also run the commands below before I test the VBS script above.
net use * /DELETE
net use /PERSISTENT:NO

and no luck the same error !!!!


Thank you
Networking

Avatar of undefined
Last Comment
Keith Alabaster

8/22/2022 - Mon
Data-Base

ASKER
any help ?
SOLUTION
Les Moore

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Data-Base

ASKER
hello,

Thank you for your replay

E:\Active Directory\    is my USB pen where the VB Script test file located, I did run it from the USB Pen to see if it can map the drives

and the script is:

Dim Network
Set Network = CreateObject("Wscript.network")

Network.MapNetworkDrive "H:", "\\STORAGE\StudentsPersonal$\%username%\" ,true
Network.MapNetworkDrive "I:","\\STORAGE\StudentsPublic$\%username%\" ,true
Network.MapNetworkDrive "J:", "\\STORAGE\StaffPublic$\" ,True
Network.MapNetworkDrive "K:", "\\STORAGE\StudentsPublic$\" ,True
Network.MapNetworkDrive "P:", "\\STORAGE\Programs$\" ,True

Network.AddWindowsPrinterConnection "\\DC\CR01$"

as I wrote in the First post (the question).

Thank you
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Data-Base

ASKER
aha yes

OK i made a mistake when I created the folder in my USB pen.

but that dose not mean it will prevent the script from running !!!!

i can call the folder "hakra-dekabra" .... loooooooooooool

and the script will still work ... right

the problem if I'm using (running) the script from the Desktop or a folder in my USB pen it dose not make the Job !!!!

and ScriptLogic Desktop Authority 7 (latest version) dose not make the job too (which has it's own script and worked perfectly for us before few days)
http://www.scriptlogic.com/products/DesktopAuthority/

Thank you again
Your help has saved me hundreds of hours of internet surfing.
fblack61
Data-Base

ASKER
I is it some permission issue !!! ? !!!

as an Admin I do not face any problem with maping any drive manual or with scriptlogic

as a normal (Student or Staff) user I do face a problem

any manual mapping will give us the error message "The path could not be found"

and still when students login into computers they get their personal drive (that you setup in the Active Directory setting) but with the manual or ScriptLogic mapping, it will not work at all !!!!!!!!!!!!!!!!!!

what can be the problem !?!
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Data-Base

ASKER
>>"as an Admin I do not face any problem...........as a normal (Student or Staff) user I do face a problem"
That pretty well guarantees a permissions error.
-------------------------------------------------------

then why the drive (personal drive) is mapped and work OK with no problems (when it's configured in AD settings),  only the drives that ScriptLogic or the VBS script try to map dose not work

oh and by the way

the personal drive is mapped as Z: and it work perfectly (in AD settings)

i also add the personal drive to be mapped as H: by ScriptLogic and in the VBS script.  and it's just dose not work ????

if it is a permission thing, then why it works just file with the AD settings and dose not work with ScriptLogig or the VBS

do you know what I mean (sorry I'm not good in english)





Logged in as a student can they access the USB drive using at a command line:
  E:\Active Director\
or do they get an access denied (permissions) error?
-------------------------------------------------------------------------------------------
yes with no problem at all and  can edit change delete with no problem !!!!!




Thank you
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Data-Base

ASKER
I solved it :-)

the problem was in the mapping path used in ScriptLogic !!!

it was so simple I shouldn't use slash in the end of the path !!!

\\server\path$$\%usernam%\  it must be \\server\path$$\%usernam% to work

and about the VB script

the old wrong one is

Dim Network
Set Network = CreateObject("Wscript.network")

Network.MapNetworkDrive "H:", "\\STORAGE\StudentsPersonal$\%username%\" ,true
Network.MapNetworkDrive "I:","\\STORAGE\StudentsPublic$\%username%\" ,true
Network.MapNetworkDrive "J:", "\\STORAGE\StaffPublic$\" ,True
Network.MapNetworkDrive "K:", "\\STORAGE\StudentsPublic$\" ,True
Network.MapNetworkDrive "P:", "\\STORAGE\Programs$\" ,True

Network.AddWindowsPrinterConnection "\\DC\CR01$"


and the right one is

Dim Network
Set Network = CreateObject("Wscript.network")

Set Shell = CreateObject("WScript.Shell")
UserName = Shell.ExpandEnvironmentStrings("%UserName%")

Network.MapNetworkDrive "H:", "\\STORAGE\StudentsPersonal$\" & UserName,true
Network.MapNetworkDrive "I:","\\STORAGE\StudentsPublic$\" & UserName" ,true
Network.MapNetworkDrive "J:", "\\STORAGE\StaffPublic$" ,True
Network.MapNetworkDrive "K:", "\\STORAGE\StudentsPublic$" ,True
Network.MapNetworkDrive "P:", "\\STORAGE\Programs$" ,True

Network.AddWindowsPrinterConnection "\\DC\CR01$"


thank you all :-)

sorry for westing your time
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Rob Williams

Thanks Data-Base,
--Rob
Keith Alabaster

:)