Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Windows XP Domain Login Script


  • Please log in to reply

#1
hulud

hulud

    Member

  • Member
  • PipPipPip
  • 268 posts
hi,

when i log on to my domain in windows xp, sometimes (not all the time) a few drives do not map.

i have drive mappings from US and Mexico servers, and today the Mexico ones mapped fine, but some of the US ones didnt. does anyone know why this would occur?

Thanks!
  • 0

Advertisements


#2
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
this kind of failure usually indicates a failure in the connection to the resource...or an authentication failure...if you add a "pause" (without the quotes) statement to the end of the batch file that's initiating the drive mapping...the output of the batch will stay on screen untill you close it...the lines of the batch that are failing should tell you why they're failing.

Edited by dsenette, 13 December 2006 - 09:53 AM.

  • 0

#3
hulud

hulud

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 268 posts
i'll add that and see what i get.

Thanks
  • 0

#4
hulud

hulud

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 268 posts
so the message i received suggested that some drives were already in use... but i still couldnt access them.

is there a way to make it so taht all network drives disconnect at logoff, and are therefore forced to connect via login script when i start back up?

thx
  • 0

#5
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
well...i use a program on my domain made by scriptlogic (www.scriptlogic.com) called desktop authority...that managed login scripting ALOT better than batch files (add printers, publish software, map drives, etc...) and it's got a function to disconnect all the drives before mapping new ones...i'm not sure how to do it with a batch...but i'll do some research for ya
  • 0

#6
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
ok...i assume you're using the net use command
try putting the first lines of the batch to

net use <your drive assignment as you have them> /delete
then follow that with the original net use lines
this will "unmap" anything that's there...then remap them

also to verify...you are assigning a volume letter to each drive in the net use command right?
  • 0

#7
hulud

hulud

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 268 posts
yes, i'm using net use and assigned drive letters to each mapping.

so if i copy all my net use mappings and paste them above the current ones with /delete

i will give that a try. thanks again for your help.

ill also take a look at that scriptlogic program, sounds pretty useful!
  • 0

#8
piper

piper

    Retired Staff

  • Retired Staff
  • 2,459 posts
A batch file will work. Here's the very simple code I just tested in my domain.

cls
REM *** Disconnect/reconnect network drives

Net use F: /DELETE

net use F: "\\JML011\E Drive"

exit
  • 0

#9
hulud

hulud

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 268 posts

cls
REM *** Disconnect/reconnect network drives

Net use F: /DELETE

net use F: "\\JML011\E Drive"

exit


okay, what is the REM *** for? jsut a note?
  • 0

#10
hulud

hulud

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 268 posts
@echo off

net time 192.168.x.x /set /y


net use f: /delete
net use g: /delete
net use h: /delete
net use m: /delete
net use p: /delete
net use t: /delete
net use i: /delete
net use k: /delete
net use n: /delete
net use o: /delete
net use q: /delete
net use j: /delete
net use l: /delete
net use f: \\server\folder
net use g: \\server\folder
net use h: /home
net use m: \\server\folder
net use p: \\server\folder
net use t: \\server\folder
net use i: \\server\folder
net use k: \\server\folder
net use n: \\server\folder
net use o: \\server\folder
net use q: \\server\folder
net use j: \\server\folder
net use l: \\server\folder
  • 0

Advertisements


#11
piper

piper

    Retired Staff

  • Retired Staff
  • 2,459 posts
A reminder statement - anything following the REM has no effect on the script. So the REM statements can be used for explanation and reminders of the purpose of the script, etc.
  • 0

#12
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
that setup SHOULD work hulud...give it a shot and see what it does

Edit: leave the pause in at the end though so you can trouble shoot problems

Edited by dsenette, 14 December 2006 - 11:22 AM.

  • 0

#13
hulud

hulud

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 268 posts
thanks both of you. i will give this a try and hopefully it will fix my problem!

i did leave the PAUSE statement at the end

Edited by hulud, 14 December 2006 - 11:27 AM.

  • 0

#14
piper

piper

    Retired Staff

  • Retired Staff
  • 2,459 posts
Did that work?
  • 0

#15
hulud

hulud

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 268 posts
it works most of the time, but sometimes a couple of drives don't map. next time it happens i will post what it says.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP