Article View: comp.os.msdos.programmer
Article #7264Re: How can a TSR detect if it has been installed?
From: Steve Resnick
Date: Sun, 23 Jun 1991 14:53
Date: Sun, 23 Jun 1991 14:53
29 lines
1935 bytes
1935 bytes
In article <0094A83A.9AE8E1A0@MAPLE.CIRCA.UFL.EDU> sorrow@oak.circa.ufl.edu writes:
>I have written a TSR that takes over the command line input for INT21H, in
>other words an INT21H replacement.
>
>How can it prevent itself from being re-installed? I know programs such as
>NORTON SI will show you who "owns" an interrupt, and my program comes up
>as the owner. If there was a way to see if the owner was NOT DOS (i.e. another
>program, such as a TSR, owned it) and to not install itself in that case, I
>would like to know.
The way I have handled this, when using an interrupt vector which may
already be used by some other utility/tsr/system function is to
grab a few bytes in the CS of the ISR as a "signature", then when installing
my TSR, look at that segment address and the specific offset. If my signature
is there, I know my TSR has been installed, otherwise it's not and I can
install it....
Hope this helps....
Steve
--
-------------------------------------------------------------------------------
resnicks@netcom.com, steve@camphq, IFNA: 1:143/105.0,
co moderator for comp.binaries.os2
Real life: Steve Resnick. Chief Software Architect, Process Scientific, Inc
Flames, grammar and spelling errors >/dev/null
The Asylum OS/2 BBS - (408)263-8017 12/2400,8,1 - Running Maximus CBCS 1.2
-------------------------------------------------------------------------------
Technical Details
Message-ID:
<1991Jun23.145337.20537@netcom.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!netcomsv!resnicksReferences:
<0094A83A.9AE8E1A0@MAPLE.CIRCA.UFL.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!netcomsv!resnicks
From: resnicks@netcom.COM (Steve Resnick)
Newsgroups: comp.os.msdos.programmer
Subject: Re: How can a TSR detect if it has been installed?
Message-ID: <1991Jun23.145337.20537@netcom.COM>
Date: 23 Jun 91 14:53:37 GMT
References: <0094A83A.9AE8E1A0@MAPLE.CIRCA.UFL.EDU>
Organization: Netcom - Online Communication Services UNIX System {408 241-9760 guest}
Lines: 29