#79074 - 2002-08-06 04:53 PM
Possible Bug in "use"
|
NameME
Fresh Scripter
Registered: 2002-08-04
Posts: 17
|
Hi all!
Seems that there's some kind of bug when using the "USE" command to delete a mapped parallel port, ie:
use lpt1: /delete
If I debug and print the @error I get 2250...
D:\test>net helpmsg 2250 The network connection could not be found.
EXPLANATION This network connection does not exist.
Can anyone else test this please ???
Yes, before trying this I already have tha local printer port mapped to a printer share on a server.
What I expected doing "use lpt1: /del" is the same effect of "net use lpt1 /delete" on the shell.
_________________________
Regards
|
|
Top
|
|
|
|
#79075 - 2002-08-06 05:22 PM
Re: Possible Bug in "use"
|
Anonymous
Anonymous
Unregistered
|
Christian, Have you went back to a non-beta version, such as 4.10, to confirm that the problem is specific to the beta version?
|
|
Top
|
|
|
|
#79076 - 2002-08-06 05:54 PM
Re: Possible Bug in "use"
|
NameME
Fresh Scripter
Registered: 2002-08-04
Posts: 17
|
Yes, indeed I'm using 4.1, not the latest beta, this post is a duplicate from the one I've posted earlier on "suggestions", I posted it here too as someone suggested me. (please read these)
_________________________
Regards
|
|
Top
|
|
|
|
#79078 - 2002-08-08 10:05 AM
Re: Possible Bug in "use"
|
NameME
Fresh Scripter
Registered: 2002-08-04
Posts: 17
|
Yes of course, what the script is doing is to delete lpt1:, map a new printer and also map lpt1: to that new printer, the only thing that doesn't work is the "lpt1: /del", I'm using NT4 Workstation and admin privileges...
I'm going to try it on win2k today and with another user ID.
_________________________
Regards
|
|
Top
|
|
|
|
#79080 - 2002-08-08 05:04 PM
Re: Possible Bug in "use"
|
NameME
Fresh Scripter
Registered: 2002-08-04
Posts: 17
|
Yes it is, the printer I'm mapping is on:
\\serverx\printerx
It is working fine if I do "dir >lpt1" on a CMD.
I Just tried the script on a Win2k machine and it having the same symptoms...
It doesn't delete the lpt1: mapping...
I'm using a workaround at the moment just doing:
Shell "net use lpt1: /delete"
It works flawlessly, but I don't find it "elegant"
_________________________
Regards
|
|
Top
|
|
|
|
#79084 - 2002-08-10 02:17 AM
Re: Possible Bug in "use"
|
BoxKite
Da Box
   
Registered: 2000-05-17
Posts: 282
Loc: Vacaville,CA,USA
|
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
|
|
Top
|
|
|
|
#79087 - 2002-08-14 07:52 PM
Re: Possible Bug in "use"
|
NameME
Fresh Scripter
Registered: 2002-08-04
Posts: 17
|
Bug or not, anywhere I try to delete lpt1: on a computer where it is already mapped the lpt1: redirection is not completely deleted or ends with an script error.
_________________________
Regards
|
|
Top
|
|
|
|
#79088 - 2002-08-14 07:54 PM
Re: Possible Bug in "use"
|
NameME
Fresh Scripter
Registered: 2002-08-04
Posts: 17
|
And yes I'm using the last official release 4.1
_________________________
Regards
|
|
Top
|
|
|
|
#79090 - 2002-11-30 11:28 AM
Re: Possible Bug in "use"
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear BoxKite,
The problem can be the combination of use and run command. Possible that kixtart receive a completion status of USE command before it actual is completed. The next RUN statement instructs kixtart to create a separate process. Possible it is already starting at the moment your previous statement isn't completed at that moment.
Question: did you have still a problem with it with kixtart 4.12? greetings.
|
|
Top
|
|
|
|
Moderator: ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|