Link to home
Start Free TrialLog in
Avatar of Data-Base
Data-BaseFlag 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
Avatar of Data-Base
Data-Base
Flag of Norway image

ASKER

any help ?
SOLUTION
Avatar of Les Moore
Les Moore
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>"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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Thanks Data-Base,
--Rob