Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon Script Not Working

Status
Not open for further replies.

roystreet

Programmer
Oct 12, 2000
146
US
Hello,
I just created my 2003 domain & am using AD. I wanted to it set up to run a bat file mapping a couple of server locations as drive letters on their local machine. It seems when I try to run it, it states there was an error loading the roaming profile. Similiar script as follows:
NET USE A: \\SERVERNAME\COMMON

I have tried the shared name & also the actual address on the server, example D:\COMMON. I have tried all sorts of versions of the above quoted type of bat file. Now, if I take the same bat file & manually run it on the clients machine, it will map the drives just fine. So, the script itself works. The issue is trying to get it to work at logon. I need help trying to figure out what I'm doing wrong. I have entered in the users profile tab, in Profile path - The exact location of the bat file - Except I put placed the file name in the script field below. There is something I'm missing & I'm not sure what it is.

Thanks,
--- roystreet
 
You probably dont mean to use roaming profiles as they mean nothing really when executing the login script usually so you can remove that info unless you really mean to use roaming profiles. Put the bat file in c:\windows\sysvol\domainname.local\scripts and just put the bat file name in the login script field and see what happens.

RoadKi11
 
Hi - Thanks for your response. I did what you said, but still had some problems. You helped me get to the next issue - So thank you very much.
I think I figured out another variable - The share names shouldn't have spaces in the name. At least that's what it looked like to me. Is this true? As soon as I changed a shares name from two separate words (With a space inbetween) to one combined word - It mapped out that drive perfectly fine.

Do you know if that is true about spaces? Do you know if I can use hyphens in the place them?

Thanks,
---roystreet
 
I have to say "Duh!" - I have to use quotes in bat file if it has spaces! Duh!

Sorry about that. I was going to go do something & then it popped right up in my mind - "Quotes!"

Thanks again for your help!

---roystreet
 
I'd suggest you scratch that and start using Group Policy so you gain better control of things.

I'd also recommend moving to vbscript instead of using BAT files. Check out my FAQ on the subject: faq329-5798

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top