Is there a bug because I have to use "/persistent?" I don't think so. The persistent switch is a part of the original DOS "net" command. It's always been there, so Microsoft must have had a reason for putting the switch in the command.
I started using Kixtart two years back. At that time I found I had to use “/persistent” in the NT section of code, but didn’t have to use persistent in the 9x section. Since that time, I’ve not changed the NT section as it works on my 2K machines. Will it work on 2K without the persistent? Yes. I still have a mix of 9x/NT/2K that need the persistent switch to map a printer for a dinosaur DOS program we still use.
I did run some tests, inside and outside the logon script. Here are the results using Kix32.exe, ver 4.0.2.0.
Test 1 worked.
code:
use lpt1: /d
use lpt1: "\\PrintServer\PrinterShareName"
shell "%comspec% /c print /d:lpt1: d:\readme_first.txt"
exit
Test 2 worked.
code:
use lpt1: /d
use lpt1: "\\PrintServer\PrinterShareName"
shell "%comspec% /c print /d:lpt1: d:\readme_first.txt"
use lpt1: /d
exit
Test 3 did not work.
code:
use lpt1: /d
use lpt1: "\\PrintServer\PrinterShareName"
run "print /d:lpt1: d:\readme_first.txt"
exit
Notes on test 3. Man this stopped my logon in a heart beat. I had to minimize the console, go in to the script and comment out all the code in test 3. Not only that, but all other attempts to use test 1 or 2 failed. I re-booted my computer, powered off my computer, turned off/on the printer; nothing I did let me use the DOS PRINT command.
Finally I decided to open a DOS box and use the “net use” command to remove and reassign “lpt1:.” Having done this, test 1 and 2 worked in and out of the logon script.
Again, is there a bug, I don’t know, but I do know “don’t use the RUN command to print to a mapped printer.”
[ 10. August 2002, 02:28: Message edited by: BoxKite ]
_________________________
Box
FACTA NON VERBA