A.D. Login script

Trying to set a login script for my Administrator user that deletes a
mapped drive when logging in. I have a batch file, one line in it:

net use * /delete /Y

Works fine on XP boxes, but haven’t had any luck on 2003 or 2012. If I
run it manually from any box it works fine, just not from the login
script.

The path I have for the script location is:

\\domain-name\ETLOGIN\batch.bat

Any suggestions as to what I’m missing to get this to work properly? I
could create a scheduled task or start menu item to do this, but I
don’t want to have to touch over 50 boxes to do this.

Any suggestions?

PS, things like this are SOOOOOOOOOOOO much easier in
eDirectory…sigh


Stevo

Path is \\domain-name\ETLOGON\batch.bat, not netlogIn… :expressionless:


Stevo

Stevo:

Have you tried a wait command for a period of time, to see if it works
after waiting? It could just be a timing issue. It’s been a long time
since I’ve done batch commands, but I’m pretty sure there’s one that
waits and you can set the amount of time of the wait. I could be
getting it mixed up with macro programming, though.

My thought was that there might need to be time for the network
connection to complete before access to the drive containing the batch
file is available : )


Susan
Novell Community Chat Moderator

http://forums.novell.com/faq.php?faq=novfor#faq_rules
http://www.ncci.org NCCIrregulars Web Site
https://www.facebook.com/groups/NCCIrregulars

Please read the following before posting in here:
http://preview.tinyurl.com/27zopdy

Susan sounds like they ‘said’:
[color=blue]

Stevo:

Have you tried a wait command for a period of time, to see if it works
after waiting? It could just be a timing issue. It’s been a long time
since I’ve done batch commands, but I’m pretty sure there’s one that
waits and you can set the amount of time of the wait. I could be
getting it mixed up with macro programming, though.

My thought was that there might need to be time for the network
connection to complete before access to the drive containing the batch
file is available : )[/color]

So my response to Susan’s comment is…

Hmmmmm, I’ll look into that. I already have some batch files for other
tasks that have a command that will wait X seconds, I’ll let ya know.


Stevo

Susan sounds like they ‘said’:
[color=blue]

Stevo:

Have you tried a wait command for a period of time, to see if it works
after waiting? It could just be a timing issue. It’s been a long time
since I’ve done batch commands, but I’m pretty sure there’s one that
waits and you can set the amount of time of the wait. I could be
getting it mixed up with macro programming, though.

My thought was that there might need to be time for the network
connection to complete before access to the drive containing the batch
file is available : )[/color]

So my response to Susan’s comment is…

Got it working, I added a command to delay the net use command, but I
think what did it was removing the unc path from the script in the user
profile.


Stevo

Very glad you were able to figure it out. : )


Susan
Novell Community Chat Moderator

http://forums.novell.com/faq.php?faq=novfor#faq_rules
http://www.ncci.org NCCIrregulars Web Site
https://www.facebook.com/groups/NCCIrregulars

Please read the following before posting in here:
http://preview.tinyurl.com/27zopdy

Susan sounds like they ‘said’:
[color=blue]

Very glad you were able to figure it out. : )[/color]

So my response to Susan’s comment is…

Me too!


Stevo

On Tue, 13 Aug 2013 14:25:26 +0000, Stevo wrote:
[color=blue]

Susan sounds like they ‘said’:
[color=green]

Stevo:

Have you tried a wait command for a period of time, to see if it works[/color]

So my response to Susan’s comment is…

Got it working, I added a command to delay the net use command, but I
think what did it was removing the unc path from the script in the user
profile.[/color]

In removing the unc path, You solved my problem too. In my case it
worked for some people most of the time but not for everybody every time.

Bob Crandell sounds like they ‘said’:
[color=blue]

In removing the unc path, You solved my problem too. In my case it
worked for some people most of the time but not for everybody every
time.[/color]

So my response to Bob’s comment is…

Well I’m glad I could help.


Stevo