Koozali.org: home of the SME Server

netlogon.bat

Offline kippi

  • **
  • 23
  • +0/-0
netlogon.bat
« on: February 10, 2010, 10:58:18 AM »
Hi

I seem to be having a problem with netlogon.bat. It seems to be working fine on windows vista but on a few of my other machine that are XP are not running the script correctly.

If I run the script \\my-server-ip\netlogon\netlogon.bat all works fine, just isn't running when they first login.

Could someone help me troubleshoot this.

Many Thanks

Chris

Offline kippi

  • **
  • 23
  • +0/-0
Re: netlogon.bat
« Reply #1 on: February 10, 2010, 11:10:38 AM »
Ok, looking more into this it only seems to work with vista and not xp pro.

Thanks

Chris

Offline kippi

  • **
  • 23
  • +0/-0
Re: netlogon.bat
« Reply #2 on: February 10, 2010, 12:11:01 PM »
Ok, Not sure how but it is working on most machines but there are still machines that the login script it not working correctly on.

Many Thanks

Chris

Online Stefano

  • *
  • 10,894
  • +3/-0
Re: netlogon.bat
« Reply #3 on: February 10, 2010, 12:41:52 PM »
Chris:

are you using smeserver-loginscript contrib?

Offline kippi

  • **
  • 23
  • +0/-0
Re: netlogon.bat
« Reply #4 on: February 10, 2010, 02:01:04 PM »
Hey

Sorry to waste everyones time but it's nothing to do with SME server its because I am trying to delete all network drives and then map new drives and it doesn't seem to like it.

Many Thanks

Chris.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: netlogon.bat
« Reply #5 on: February 10, 2010, 03:03:14 PM »
kippi

Look up the command
net use

Something like this works

net use /delete H: /yes
net use /delete J: /yes
net use /delete K: /yes
net use /delete P: /yes
net use /delete R: /yes
net use /delete S: /yes
net use /delete T: /yes
net use /delete U: /yes
net use /delete Y: /yes
net use H: /home
net use J: \\server\cd-dvd
net use K: \\server\k
net use P: \\server\p
net use R: \\server\r
net use S: \\server\s
net use T: \\server\t
net use U: \\server\u
net use Y: \\server\y
net use \\server\hplaserxxxx
net use \\server\hplaserxxxx
net time \\server /set /yes
net use /delete Z: /yes
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline kippi

  • **
  • 23
  • +0/-0
Re: netlogon.bat
« Reply #6 on: February 10, 2010, 03:26:04 PM »
I wanted to remove all mapped drives that might off be mapped from the machine before.

Thanks

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: netlogon.bat
« Reply #7 on: February 10, 2010, 03:57:40 PM »
kippi

Just add a line for each letter of the alphabet
net use /delete D: /yes
net use /delete E: /yes
net use /delete F: /yes
net use /delete G: /yes
and so on ......
net use /delete X: /yes
net use /delete Y: /yes
net use /delete Z: /yes
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Online Stefano

  • *
  • 10,894
  • +3/-0
Re: netlogon.bat
« Reply #8 on: February 10, 2010, 04:01:42 PM »
or, in a easier way, you can simply do

NET USE * /DELETE /Y

This will clear all mapped drives, without prompting, and allow you to create new ones without conflict.

Offline kippi

  • **
  • 23
  • +0/-0
Re: netlogon.bat
« Reply #9 on: February 10, 2010, 04:20:57 PM »
This is where the problems come. Everything is fine up to the point of adding in NET USE * /DELETE /Y and it stops re-mapping the drives.

Many Thanks

Chris

Online Stefano

  • *
  • 10,894
  • +3/-0
Re: netlogon.bat
« Reply #10 on: February 10, 2010, 04:31:04 PM »
Chris, did you try to search with google? something like "logon script remove all mapped drives"?
you'll find many results..

anyway, you din not answer my previous question: are you using smeserver-loginscripts contrib?

Offline kippi

  • **
  • 23
  • +0/-0
Re: netlogon.bat
« Reply #11 on: February 10, 2010, 04:37:06 PM »
Stefano

I know how to remove drives it when you add it to their logon script that it stops the other drives from mapping.

I did download this and install it but have not used it yet, I am using:

call  \\192.168.20.250\netlogon\scripts\%USERNAME%.bat to load the users login script.

Thanks

Chris.

Offline kippi

  • **
  • 23
  • +0/-0
Re: netlogon.bat
« Reply #12 on: February 11, 2010, 11:00:58 AM »
Ok,

Long and short of it all I needed to do was to add C: at the start of my netlogon script and all is working now.

Thanks for all your help.

Chris.