If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#46
|
|||
|
|||
Ethernet adapter interfering with Mouse
wrote in message ... On Jul 21, 4:27 pm, "Pegasus [MVP]" wrote: *** See below. wrote in message ... Here is the experimental script that I used. I basically just moved the ping to the beginning of the subroutine, as a test to see if the "call" command would block or not. According to the documentation, the script is supposed to continue executing without waiting for the call command to finish *** I do not know what documentation you refer to but whatever *** it is, it is incorrect. The ping command I used will cause the *** batch file to pause unconditionally. so that means we should see the "Entering Sub" line printed out twice immediately. But when I run it, I see "Entering Sub", followed by a 9 second pause, followed by "Exiting Sub" and then "Entering Sub", followed by a 9 second pause and then "Exiting Sub". *** This is exactly what I expected. So based on that behavior, it would seem that the ping command isn't necessary at all in the script. *** I introduced the ping command because I did not know *** whether you needed to keep your NIC off for a few *** seconds. I alluded to this in my second response. The *** interrupt problem you report is fairly bizarre, hence *** the work-around may need to do some bizarre things too . . . It seems to work fine without it. *** Great! But now I'm confused about when the call command is blocking and when it is non-blocking. *** The subroutine disables the NIC when invoked with a "disable" *** parameter and vice versa. Furthermore it tells you what it does *** when you invoke it from a Command Prompt or if you add *** a Pause command like so: call :Sub disable call :Sub enable pause goto :eof *** or perhaps like so: call :Sub disable call :Sub enable ping localhost -n 5 nul goto :eof Here is the documentation I found for the call command: http://www.microsoft.com/resources/d....mspx?mfr=true It says: "Calls one batch program from another without stopping the parent batch program." So it sounds like each "call" command will, in effect, start a separate thread. So the main program would launch the subroutine with the "disable" parameter, and then it would immediately launch the subroutine again with the "enable" parameter, and you'd be trying to disable and enable the network adapter at the same time. That's why I thought the ping command to simulate a sleep was necessary, to force the enable function to be performed after the disable function was finished. But the behavior I am noticing seems to indicate that a sleep isn't necessary, and that contradicts the documentation. *** Microsoft expressed it poorly. The writer meant to say *** "without terminating the parent program". If you're familiar *** with the term "subroutine" then set "call" = "subroutine *** and all should be clear. It is actually possible to start a *** program in a separate thread but this is a different topic *** altogether and is not appropriate within the context of *** the batch file I designed for you. |
Ads |
#47
|
|||
|
|||
Ethernet adapter interfering with Mouse
wrote in message ... On Jul 21, 4:27 pm, "Pegasus [MVP]" wrote: *** See below. wrote in message ... Here is the experimental script that I used. I basically just moved the ping to the beginning of the subroutine, as a test to see if the "call" command would block or not. According to the documentation, the script is supposed to continue executing without waiting for the call command to finish *** I do not know what documentation you refer to but whatever *** it is, it is incorrect. The ping command I used will cause the *** batch file to pause unconditionally. so that means we should see the "Entering Sub" line printed out twice immediately. But when I run it, I see "Entering Sub", followed by a 9 second pause, followed by "Exiting Sub" and then "Entering Sub", followed by a 9 second pause and then "Exiting Sub". *** This is exactly what I expected. So based on that behavior, it would seem that the ping command isn't necessary at all in the script. *** I introduced the ping command because I did not know *** whether you needed to keep your NIC off for a few *** seconds. I alluded to this in my second response. The *** interrupt problem you report is fairly bizarre, hence *** the work-around may need to do some bizarre things too . . . It seems to work fine without it. *** Great! But now I'm confused about when the call command is blocking and when it is non-blocking. *** The subroutine disables the NIC when invoked with a "disable" *** parameter and vice versa. Furthermore it tells you what it does *** when you invoke it from a Command Prompt or if you add *** a Pause command like so: call :Sub disable call :Sub enable pause goto :eof *** or perhaps like so: call :Sub disable call :Sub enable ping localhost -n 5 nul goto :eof Here is the documentation I found for the call command: http://www.microsoft.com/resources/d....mspx?mfr=true It says: "Calls one batch program from another without stopping the parent batch program." So it sounds like each "call" command will, in effect, start a separate thread. So the main program would launch the subroutine with the "disable" parameter, and then it would immediately launch the subroutine again with the "enable" parameter, and you'd be trying to disable and enable the network adapter at the same time. That's why I thought the ping command to simulate a sleep was necessary, to force the enable function to be performed after the disable function was finished. But the behavior I am noticing seems to indicate that a sleep isn't necessary, and that contradicts the documentation. *** Microsoft expressed it poorly. The writer meant to say *** "without terminating the parent program". If you're familiar *** with the term "subroutine" then set "call" = "subroutine *** and all should be clear. It is actually possible to start a *** program in a separate thread but this is a different topic *** altogether and is not appropriate within the context of *** the batch file I designed for you. |
#48
|
|||
|
|||
Ethernet adapter interfering with Mouse
On Jul 21, 5:14*pm, "Pegasus [MVP]" wrote:
Here is the documentation I found for the call command:http://www.microsoft.com/resources/d...s/xp/all/prodd... It says: "Calls one batch program from another without stopping the parent batch program." *So it sounds like each "call" command will, in effect, start a separate thread. *So the main program would launch the subroutine with the "disable" parameter, and then it would immediately launch the subroutine again with the "enable" parameter, and you'd be trying to disable and enable the network adapter at the same time. That's why I thought the ping command to simulate a sleep was necessary, to force the enable function to be performed after the disable function was finished. *But the behavior I am noticing seems to indicate that a sleep isn't necessary, and that contradicts the documentation. *** Microsoft expressed it poorly. The writer meant to say *** "without terminating the parent program". If you're familiar *** with the term "subroutine" then set "call" = "subroutine *** and all should be clear. It is actually possible to start a *** program in a separate thread but this is a different topic *** altogether and is not appropriate within the context of *** the batch file I designed for you. OK, I guess I was making this more complicated than it actually is. Thanks for your help! |
#49
|
|||
|
|||
Ethernet adapter interfering with Mouse
On Jul 21, 5:14*pm, "Pegasus [MVP]" wrote:
Here is the documentation I found for the call command:http://www.microsoft.com/resources/d...s/xp/all/prodd... It says: "Calls one batch program from another without stopping the parent batch program." *So it sounds like each "call" command will, in effect, start a separate thread. *So the main program would launch the subroutine with the "disable" parameter, and then it would immediately launch the subroutine again with the "enable" parameter, and you'd be trying to disable and enable the network adapter at the same time. That's why I thought the ping command to simulate a sleep was necessary, to force the enable function to be performed after the disable function was finished. *But the behavior I am noticing seems to indicate that a sleep isn't necessary, and that contradicts the documentation. *** Microsoft expressed it poorly. The writer meant to say *** "without terminating the parent program". If you're familiar *** with the term "subroutine" then set "call" = "subroutine *** and all should be clear. It is actually possible to start a *** program in a separate thread but this is a different topic *** altogether and is not appropriate within the context of *** the batch file I designed for you. OK, I guess I was making this more complicated than it actually is. Thanks for your help! |
#50
|
|||
|
|||
Ethernet adapter interfering with Mouse
Here is the documentation I found for the call command: http://www.microsoft.com/resources/d....mspx?mfr=true It says: "Calls one batch program from another without stopping the parent batch program." So it sounds like each "call" command will, in effect, start a separate thread. So the main program would launch the subroutine with the "disable" parameter, and then it would immediately launch the subroutine again with the "enable" parameter, and you'd be trying to disable and enable the network adapter at the same time. That's why I thought the ping command to simulate a sleep was necessary, to force the enable function to be performed after the disable function was finished. But the behavior I am noticing seems to indicate that a sleep isn't necessary, and that contradicts the documentation. -- I think you're misinterpreting the documentation. When Call is used, the initial batch file will wait for the called one to complete and will then resume. If call is not used, the initial batch will terminate when the second one is launched. Note within Windows if you want to launch a batch file as a separate thread and continue execution in the caller, the Start command can be used rather than Call. |
#51
|
|||
|
|||
Ethernet adapter interfering with Mouse
Here is the documentation I found for the call command: http://www.microsoft.com/resources/d....mspx?mfr=true It says: "Calls one batch program from another without stopping the parent batch program." So it sounds like each "call" command will, in effect, start a separate thread. So the main program would launch the subroutine with the "disable" parameter, and then it would immediately launch the subroutine again with the "enable" parameter, and you'd be trying to disable and enable the network adapter at the same time. That's why I thought the ping command to simulate a sleep was necessary, to force the enable function to be performed after the disable function was finished. But the behavior I am noticing seems to indicate that a sleep isn't necessary, and that contradicts the documentation. -- I think you're misinterpreting the documentation. When Call is used, the initial batch file will wait for the called one to complete and will then resume. If call is not used, the initial batch will terminate when the second one is launched. Note within Windows if you want to launch a batch file as a separate thread and continue execution in the caller, the Start command can be used rather than Call. |
#52
|
|||
|
|||
Ethernet adapter interfering with Mouse
What is the make and model of laptop? Have you checked whether there is an
updated BIOS available? Also, the manufacturers support site for any info (in case there's a known issue)? It is a Thinkpad T60. I did upgrade to the latest BIOS, and that did not help. I have posted about this problem to forums.lenovo.com and also forum.thinkpad.com, and no one seems to have heard of this problem. A google search about this problem also really doesn't turn up anything. It really does seem like a bizarre problem. -- It sure does! Sounds like you've done a great job of troubleshooting. It would be interesting to see if Lenovo has anything to say about it. |
#53
|
|||
|
|||
Ethernet adapter interfering with Mouse
What is the make and model of laptop? Have you checked whether there is an
updated BIOS available? Also, the manufacturers support site for any info (in case there's a known issue)? It is a Thinkpad T60. I did upgrade to the latest BIOS, and that did not help. I have posted about this problem to forums.lenovo.com and also forum.thinkpad.com, and no one seems to have heard of this problem. A google search about this problem also really doesn't turn up anything. It really does seem like a bizarre problem. -- It sure does! Sounds like you've done a great job of troubleshooting. It would be interesting to see if Lenovo has anything to say about it. |
#54
|
|||
|
|||
Ethernet adapter interfering with Mouse
On Jul 21, 5:57*pm, "GTS" wrote:
Here is the documentation I found for the call command:http://www.microsoft.com/resources/d...s/xp/all/prodd... It says: "Calls one batch program from another without stopping the parent batch program." *So it sounds like each "call" command will, in effect, start a separate thread. *So the main program would launch the subroutine with the "disable" parameter, and then it would immediately launch the subroutine again with the "enable" parameter, and you'd be trying to disable and enable the network adapter at the same time. That's why I thought the ping command to simulate a sleep was necessary, to force the enable function to be performed after the disable function was finished. *But the behavior I am noticing seems to indicate that a sleep isn't necessary, and that contradicts the documentation. -- I think you're misinterpreting the documentation. *When Call is used, the initial batch file will wait for the called one to complete and will then resume. *If call is not used, the initial batch will terminate when the second one is launched. *Note within Windows if you want to launch a batch file as a separate thread and continue execution in the caller, the Start command can be used rather than Call. Thank you, you are right. |
#55
|
|||
|
|||
Ethernet adapter interfering with Mouse
On Jul 21, 5:57*pm, "GTS" wrote:
Here is the documentation I found for the call command:http://www.microsoft.com/resources/d...s/xp/all/prodd... It says: "Calls one batch program from another without stopping the parent batch program." *So it sounds like each "call" command will, in effect, start a separate thread. *So the main program would launch the subroutine with the "disable" parameter, and then it would immediately launch the subroutine again with the "enable" parameter, and you'd be trying to disable and enable the network adapter at the same time. That's why I thought the ping command to simulate a sleep was necessary, to force the enable function to be performed after the disable function was finished. *But the behavior I am noticing seems to indicate that a sleep isn't necessary, and that contradicts the documentation. -- I think you're misinterpreting the documentation. *When Call is used, the initial batch file will wait for the called one to complete and will then resume. *If call is not used, the initial batch will terminate when the second one is launched. *Note within Windows if you want to launch a batch file as a separate thread and continue execution in the caller, the Start command can be used rather than Call. Thank you, you are right. |
#56
|
|||
|
|||
Ethernet adapter interfering with Mouse
On Jul 21, 5:59*pm, "GTS" wrote:
What is the make and model of laptop? Have you checked whether there is an updated BIOS available? Also, the manufacturers support site for any info (in case there's a known issue)? It is a Thinkpad T60. *I did upgrade to the latest BIOS, and that did not help. *I have posted about this problem to forums.lenovo.com and also forum.thinkpad.com, and no one seems to have heard of this problem. *A google search about this problem also really doesn't turn up anything. *It really does seem like a bizarre problem. -- It sure does! *Sounds like you've done a great job of troubleshooting. *It would be interesting to see if Lenovo has anything to say about it. Well I just got this laptop used off ebay (in great condition though, no sign of any physical damage), and the warranty has already expired, so I will not be able to open any support tickets with them. |
#57
|
|||
|
|||
Ethernet adapter interfering with Mouse
On Jul 21, 5:59*pm, "GTS" wrote:
What is the make and model of laptop? Have you checked whether there is an updated BIOS available? Also, the manufacturers support site for any info (in case there's a known issue)? It is a Thinkpad T60. *I did upgrade to the latest BIOS, and that did not help. *I have posted about this problem to forums.lenovo.com and also forum.thinkpad.com, and no one seems to have heard of this problem. *A google search about this problem also really doesn't turn up anything. *It really does seem like a bizarre problem. -- It sure does! *Sounds like you've done a great job of troubleshooting. *It would be interesting to see if Lenovo has anything to say about it. Well I just got this laptop used off ebay (in great condition though, no sign of any physical damage), and the warranty has already expired, so I will not be able to open any support tickets with them. |
#58
|
|||
|
|||
Ethernet adapter interfering with Mouse
On Jul 20, 7:38*am, "Pavel A." wrote:
After you disable & enable the netcard, does it use same interrupt number as if enabled before reboot? What is CPU usage % when mouse is jerky and when isn't? I was monitoring the other group, so I didn't see this post until now. Interesting. I have the mouse being jerky right now. The network adapter is on IRQ 16. And when I'm not moving the mouse, the CPU shows 0% usage (on the Performance tab). When I move the mouse around though, the CPU usage goes up to 20-30%. But the Processes tab doesn't show any process that's taking up the CPU. The System Idle Process stays at 99% usage when I move the mouse around. Now I just disabled and re-enabled the network adapter. It's still on IRQ 16. And the CPU doesn't go higher than 2% when I move the mouse around. |
#59
|
|||
|
|||
Ethernet adapter interfering with Mouse
On Jul 20, 7:38*am, "Pavel A." wrote:
After you disable & enable the netcard, does it use same interrupt number as if enabled before reboot? What is CPU usage % when mouse is jerky and when isn't? I was monitoring the other group, so I didn't see this post until now. Interesting. I have the mouse being jerky right now. The network adapter is on IRQ 16. And when I'm not moving the mouse, the CPU shows 0% usage (on the Performance tab). When I move the mouse around though, the CPU usage goes up to 20-30%. But the Processes tab doesn't show any process that's taking up the CPU. The System Idle Process stays at 99% usage when I move the mouse around. Now I just disabled and re-enabled the network adapter. It's still on IRQ 16. And the CPU doesn't go higher than 2% when I move the mouse around. |
#60
|
|||
|
|||
Ethernet adapter interfering with Mouse
|
Thread Tools | |
Display Modes | |
|
|