[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Stopping USB drives from XY4 - Script



Dear Robert

I have been experimenting further with the STOPUSB.GO script which you wrote for me a while ago.
The following script (much the same as we discussed before but laid out line by line as you
suggested) appears to work correctly either as given below and running from the command line in the
same memory space as XY4 or using the third command line string, commented out below, but with the
last line of the script commented back in.

/// Issue a DOS command line like this:
/// GoXy.exe C:\XY4\S STOPUSB.GO "" c
/// In XyWrite:
/// dos/nv/x/z /c GoXy.exe c:\XY4\STOPUSB.GO "" c
/// This line starts goxy in a separate memory space:
/// dos/nv/x/z /c kmd/c start GoXy.exe c:\XY4\STOPUSB.GO "" c
key(LW)rkey(WT{500})
RunDLL32.exe shell32.dll,Control_RunDLL hotplug.dllkey(ET)
key(WT{1000}L1WT{500}JW{USB Mass Storage Device})KEY(WT{500}RD)key(IF{TD=USB Mass:G2})key(JW{Unplug
or Eject Hardware}CDG1L2)
key(AL)skey
key(WT{1000}ET)
key(WT{1000}ET)
key(WT{1000}AL)ckey
/// Return to XyWrite on conclusion:
/// key(JW{TO})

In the first case the script does not return me to XY4, whether the last line is included or not.
In the second case it usually does. However in both cases my font loaded with VGA.COM is replaced
by the standard font.

It seems that the behaviour of my desktop machine is different to your laptops in that killing any
line of the second 'Stop' box has the effect of killing the USB device correctly and all entries in
that box, including the root hub, disapper. Apparently this is how it works, here at least, so
there is no problematical logic involved. What I don't understand, however, is why even when
running in a separate memory space my font is zapped. The only clue I can offer, which may mean
something to you, is that when running the script in the same memory space as XY4, there is a brief
switch back to XY4 at the end of line two of the script after which it rapidly switches back and
continue with the succeeding lines. Is this supposed to happen?

Paul