MS-DOS: How to Detect If SHARE.EXE Is Present

ID Number: Q44346

3.x

MS-DOS

Summary:

SHARE.EXE provides file sharing and locking to the MS-DOS operating

system. To determine whether SHARE.EXE is loaded, an Interrupt 2FH

call is used. The parameters for the call are as follows:

AH = 10H

AL = 00H

The result will be returned in the AL register with the following

values:

00H - Not installed, OK to install

01H - Not installed, not OK to install

FFH - Installed

Sample code would look like the following:

(other program code)

MOV AH,10H ; Set up registers for installed call

MOV AL,00H ; for SHARE.EXE

INT 2FH ; Make the call, return value in AL