logon script not working - need hlep

  • Thread starter John Leonard - Sage
  • Start date
J

John Leonard - Sage

I am trying to use the properties in the Profile of an account. logon
script.

Having a problem with Net Use with Windows 2003 Server NETLOGON.
I can see the NETLOGON from the client MY Network ... and from the server
using NET SHARE

If I run the net use command on the client - it works great.
 
J

Jerold Schulman

I am trying to use the properties in the Profile of an account. logon
script.

Having a problem with Net Use with Windows 2003 Server NETLOGON.


I can see the NETLOGON from the client MY Network ... and from the server
using NET SHARE

If I run the net use command on the client - it works great.
Is group policy configured to set the logon script path to pslogon.bat, with no leading path?
Also, I would add the following line, before the net use S: \\gateway\psdata line:
if exist S:\*.* net use S: /delete



Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
 
P

Pegasus \(MVP\)

John Leonard - Sage said:
I am trying to use the properties in the Profile of an account. logon
script.

Having a problem with Net Use with Windows 2003 Server NETLOGON.


I can see the NETLOGON from the client MY Network ... and from the server
using NET SHARE

If I run the net use command on the client - it works great.

There are a few things you need to become aware of:
1. The physical location of your logon script is not important.
What matters is that the logon script resides in the "netlogon"
share of your server. Does it?
2. Did you specify pslogon.bat in your users' profiles?
3. Placing the "exit" command after the "net use" command is not
only unnecessary; it also deprives you of any diagnostic feedback.
A far better way would be to code the script like so during
the debugging phase:
@echo off
echo Starting the logon script
net use s: \\gateway\psdata
pause

You will now have plenty of time to watch what's going on.
 
J

John Leonard - Sage

Thanks - I found my problem.

I had installed Windows 2003 development tools on the client and it changed
the environment path.
 
P

Pegasus \(MVP\)

If you mean the environmental %path% variable then you
probably have a deeper problem.

When writing batch files that execute automatically (e.g. at
logon time) then it is absolutely essential that you specify the
full path for all your commands. Instead of writing
MyUtility.exe, you should write
c:\tools\MyUtility.exe

Omitting the path will sooner or later get you into trouble,
as you found out. You can, of course, fix the %path% variable
but your batch file will fail again at some stage unless you fix
the underlying problem. It's called "robust code".
 
J

John Leonard - Sage

Thanks for all your help.

I did change the environmental %path% and deleted the Windows 2003
Development Kit. All is working perfectly now.

I appreciate your comment on the MS bulletin board - Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top