Discussion Locked

Errors in login scripts

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi

I have created a login script on a NT4 server, When i try to login to the server from my windows 98 pc an error message is appearing, however i cant see the error message in full as the script runs too fast.

Is there any way of logging whathappens when the script runs so i can see this error message.

9 replies

by dklippert

One suggestion from the forums is to add the following to each line in the script:

@echo YourScriptLine 1>>%TEMP%\script.log 2>>%TEMP%\script.err

This should create logs of status and errors

by hayesm

Produced a scipt.err file okay but nothing in it, no script.log file created.

by sgt_shultz

sorry. so you are saying, you put a line with the word pause in your script and you run it manually to test and you don't get a, uh, pause (a place where the script prompts, 'press any key to continue' ?

by hayesm

Yes for instance the first line of my script connect me to a server, i typed the word pause after this line but nothing happened i.e net use h:\myserver\sharename pause.

Thanks for responding

by sgt_shultz

sorry.
put the word pause on a line all by itself to get it to work. if you put a line with the word pause on it after each line in your batch file (if practical) you can watch the batch file run...like this:

@echo here is a test batch file to see pause in action
pause
@echo a really good book on script commands is Windows NT Shell Scripting by Tim Hill
pause
net use lpt3: \\machinename\printersharename /USER:domainname\username /PERSISTENT:yes

This discussion is closed to new replies.