[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Trouble restarting NB after Quitting?
- Subject: Trouble restarting NB after Quitting?
- From: "Robert Holmgren" holmgren@xxxxxxxx
- Date: Sun, 22 Jun 2008 00:57:19 -0400
If, like me, you have intermittent trouble restarting NB
after Quitting, here's a permanent solution.
The underlying problem is that NB successfully quits but its
parent NTVDM.EXE (Virtual DOS Machine) process does not
quit. That parent NTVDM process is associated with (has a
dependency upon) WOWEXEC.DLL ("Windows On Windows", which
thunks NB's 16-bit, Windows v3.1-level code into a 32-bit
environment). When NB [re]starts, it opens a new instance
of NTVDM, but if another already-running NTVDM instance has
already associated with WOWEXEC, NB will abort -- NB *must*
run in the ONE unique instance of NTVDM (if any) that is
associated with WOWEXEC. I generally have four or five
instances of NTVDM running at any given moment (for DOS
windows, or real DOS programs like XyWrite and LIST.EXE) --
but only ONE (and sometimes none) is associated with
WOWEXEC.
How do you determine which of several running NTVDMs is
dependent on WOWEXEC? Manually, the preferred tool is
"Process Explorer" from SysInternals.com
(http://www.sysinternals.com) -- by far the best enhanced
Task Manager for Windows. In Process Explorer, click View
==> checkmark "Show Lower Pane" ==> in "Lower Pane View"
checkmark "Handles". Highlight each NTVDM, scroll through
the lower pane list, and when you find WOWEXEC.DLL, close
that instance of NTVDM (highlight NTVDM ==> right-click ==>
"Kill Process"). NBWin will then restart successfully.
It's cumbersome! There's a better way to ensure that this
never happens: force the parent NTVDM process to die when
NBWin Quits, by killing NTVDM (the parent) rather than NB
(the child). When you kill a parent, the whole subsidiary
process tree dies too.
Here's how. Download FINITO.ZIP at:
http://users.datarealm.com/xywwweb/FINITO.ZIP
UnZIP this file in the directory (folder) that contains
NOTABENE.EXE -- what NB calls its "%root%" directory. The
ZIP contains two files: FINITO.PM and KillNB.exe -- both
should be located in %root%. Dedicate a "Quit" key in
your KeyBoarD file. Assign FINITO.PM to this key:
##=BXr,u,n, ,d,:,\,p,a,t,h,\,f,i,n,i,t,o,.,p,m,Q2
where "d:\path\" is the drive:\directory of your NB %root%
directory, e.g.:
##=BXr,u,n,
,c,:,\,p,r,o,g,r,a,~,1,\,n,b,w,i,n,\,f,i,n,i,t,o,.,p,m,Q2
FINITO.PM operates as follows:
- If, optionally, you run Stack (a U2 command recall
facility), the current Stack is Saved to disk for reloading
the next time you run NB
- If any windows containing texts remain open, FINITO aborts
with the message that Windows are Open -- SAve and close
them all before quitting! Otherwise you will get a message
when you restart NB that files were terminated abnormally.
- FINITO checks to see whether KillNB.exe exists in %root%.
If yes, KillNB kills the current NTVDM (if no, FINITO calls
the traditional "QUIT/NV"). KillNB kills by Window Title,
using "Nota Bene" as the target Title to kill. If your
installation uses a different Title, then you'll need to
edit FINITO.PM accordingly; but on my machines, both
Scholar's Workstation and Lingua bear the Window Title "Nota
Bene" (no matter what I name the window manually).
KillNB.exe has a "debug" mode that allows you to determine
the Title unambiguously -- command (in DOS) "killnb /?" for
further info.
No more problem!
Tested in Win2K, WinXP, and Vista Ultimate (UAC disabled). NT+
only (not for 9x).
-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------