@DEFINEPROJECT
	@Name = "DynaScan"
        @Version = "3.01"
	@Immediate = 1
	@OutDrive = @WindowsDrive
	@SubDir = "@WindowsDir"
@EndProject

@DefineVars
@Integer @Blue = @RGB(0,0,255)
@Integer @Black = @RGB(0,0,0)
@Integer @Done = 0
@QString @CGroup = "[CreateGroup(DynaScan 3.0)]"
@QString @Icon1 = "@OutDrive:@SubDir\\scanner.hlp, Online Manual, @OutDrive:@SubDir\\winhelp.exe"
@QString @Icon2 = "@OutDrive:@SubDir\\envision\\test.exe, Scanner Test, @OutDrive:@SubDir\\envision\\test.exe"
@QString @Icon3 = "@OutDrive:@SubDir\\envision\\setup.exe, 3rd Party Application Setup, @OutDrive:@SubDir\\envision\\setup.exe"
@Qstring @Line = ""
@Qstring @DRV1 = "DEVICE=VENVD.386"
@Qstring @DRV2 = "DEVICE=DYNAIS11.386"
@Qstring @DRV3 = "DEVICE=ENVIS11.386"
@Qstring @DRV4 = "DEVICE=VJRDD.386"
@Qstring @DRV5 = "DEVICE=ENVIS10.386"
@Qstring @DRV6 = "DEVICE=UMAXIS11.386"
@Qstring @DRV7 = "DEVICE=VDYNAD.386"
@EndVars

@BackGroundMode (3, @Blue, @Black)
@Display

Initializing...

@EndDisplay

@If (@Exists("@OutDrive:@SubDir\\TWAIN.DLL"))

@If (@Exists("@OUTDRIVE:\\config.sys"))

@Copy ("@OutDrive:\\config.sys", "@OutDrive:\\config.dyn")

@Done = @ReadLn("@OutDrive:\\Config.sys", "@@Line")
@Write("@OutDrive:\\dynacfg.tmp", "wt", "@Line\n")

LPY:
	@Done = @ReadLn(,"@@Line")
	@If (@StrFind("@StrUpr("@Line")", "USCAN.SYS") >= 0)
		@Goto LPY
	@EndIf
	@If (@StrFind("@StrUpr("@Line")", "USCANB.SYS") >= 0)
		@Goto LPY
	@EndIf
	@If (@StrFind("@StrUpr("@Line")", "UMAXMEM.SYS") >= 0)
		@Goto LPY
	@EndIf
	@If (@StrFind("@StrUpr("@Line")", "ENVISION\\ASPI2DOS.SYS") >= 0)
		@Goto LPY
	@EndIf
	@If (@Done == -1)
		@Goto CNT
	@EndIf
	@Write(,, "@Line\n")

@Goto LPY

CNT:

@Copy ("@OutDrive:\\dynacfg.tmp", "@OutDrive:\\config.sys")
@Delete ("@OutDrive:\\dynacfg.tmp")

@EndIf
@If (@Exists("@OutDrive:@SubDir\\system.ini"))

@Copy ("@OutDrive:@SubDir\\system.ini", "@OutDrive:@SubDir\\system.bak")
@Copy ("@OutDrive:@SubDir\\system.ini", "@OutDrive:@SubDir\\system.dyn")

@Done = @ReadLn("@OutDrive:@SubDir\\system.ini", "@@Line")
@Write("@OutDrive:@SubDir\\dynasys.tmp", "wt", "@Line\n")

LOOP:
	@Done = @ReadLn(,"@@Line")
	@If ("@StrUpr("@Line")" == "@DRV1")
		@Goto LOOP
	@EndIf
	@If ("@StrUpr("@Line")" == "@DRV2")
		@Goto LOOP
	@EndIf
	@If ("@StrUpr("@Line")" == "@DRV3")
		@Goto LOOP
	@EndIf
	@If ("@StrUpr("@Line")" == "@DRV4")
		@Goto LOOP
	@EndIf
	@If ("@StrUpr("@Line")" == "@DRV5")
		@Goto LOOP
	@EndIf
	@If ("@StrUpr("@Line")" == "@DRV6")
		@Goto LOOP
	@EndIf
        @If ("@StrUpr("@Line")" == "@DRV7")
		@Goto LOOP
	@EndIf

	@If (@Done == -1)
		@Goto CONTINUE
	@EndIf
	@Write(,, "@Line\n")

@Goto LOOP

CONTINUE:

@Copy ("@OutDrive:@SubDir\\dynasys.tmp", "@OutDrive:@SubDir\\system.ini")
@Delete ("@OutDrive:@SubDir\\dynasys.tmp")
@EndIf
@Delete ("@OutDrive:@SubDir\\TWAIN_32\\DYNA_32.DS")
@Delete ("@OutDrive:@SubDir\\VENVD.386")
@Delete ("@OutDrive:@SubDir\\SCANNER.HLP")
@Delete ("@OutDrive:@SubDir\\32BITDLL.DLL")
@Delete ("@OutDrive:@SubDir\\DM16S.DLL")
@Delete ("@OutDrive:@SubDir\\DM32.DLL")
@Delete ("@OutDrive:@SubDir\\DYNADEF.INI")
@Delete ("@OutDrive:@SubDir\\DYNA32.INI")
@Delete ("@OutDrive:@SubDir\\DYNA32D.INI")
@Delete ("@OutDrive:@SubDir\\DYNASCAN.DLL")
@Delete ("@OutDrive:@SubDir\\DYNASCAN.INI")
@Delete ("@OutDrive:@SubDir\\ENV32FT.DLL")
@Delete ("@OutDrive:@SubDir\\ENV16UT.DLL")
@Delete ("@OutDrive:@SubDir\\ENV16FT.DLL")
@Delete ("@OutDrive:@SubDir\\ENV32UT.DLL")
@Delete ("@OutDrive:@SubDir\\ENV11.386")
@Delete ("@OutDrive:@SubDir\\TWAIN.DLL")
@Delete ("@OutDrive:@SubDir\\TWAIN_32.DLL")
@Delete ("@OutDrive:@SubDir\\TWUNK_16.EXE")
@Delete ("@OutDrive:@SubDir\\TWAIN32.DLL")
@Delete ("@OutDrive:@SubDir\\TWUNK_32.EXE")
@Delete ("@OutDrive:@SubDir\\UFILE32.DLL")
@Delete ("@OutDrive:@SubDir\\UMAXFILE.DLL")
@Delete ("@OutDrive:@SubDir\\WINDOZE2.EXE")
@Delete ("@OutDrive:@SubDir\\ENVISION\\IS10DRV.INI")
@Delete ("@OutDrive:@SubDir\\ENVISION\\ASPI2DOS.SYS")
@Delete ("@OutDrive:@SubDir\\ENVISION\\ASPIDRV.INI")
@Delete ("@OutDrive:@SubDir\\ENVISION\\DISK.ID")
@Delete ("@OutDrive:@SubDir\\ENVISION\\DYNASCAN.DS")
@Delete ("@OutDrive:@SubDir\\ENVISION\\ENVISION.TRS")
@Delete ("@OutDrive:@SubDir\\ENVISION\\INSTALL.DAT")
@Delete ("@OutDrive:@SubDir\\ENVISION\\APPS.HLP")
@Delete ("@OutDrive:@SubDir\\ENVISION\\IS11DRV.INI")
@Delete ("@OutDrive:@SubDir\\ENV10.386")
@Delete ("@OutDrive:@SubDir\\ENVISION\\PXTWAIN.TRS")
@Delete ("@OutDrive:@SubDir\\ENVISION\\SETUP.EXE")
@Delete ("@OutDrive:@SubDir\\ENVISION\\PXTWAIN.TRS")
@Delete ("@OutDrive:@SubDir\\ENVISION\\README.TXT")
@Delete ("@OutDrive:@SubDir\\ENVISION\\README.WRI")
@Delete ("@OutDrive:@SubDir\\ENVISION\\SCANMGR.INI")
@Delete ("@OutDrive:@SubDir\\ENVISION\\SCANMGR.LST")
@Delete ("@OutDrive:@SubDir\\ENVISION\\SCANNER.DAT")
@Delete ("@OutDrive:@SubDir\\ENVISION\\TEST.EXE")
@Delete ("@OutDrive:@SubDir\\ENVISION\\TWAIN8B.8BA")
@Delete ("@OutDrive:@SubDir\\TWAIN32\\DYNA32.DS")
@Delete ("@OutDrive:@SubDir\\TWAIN\\DYNA16.DS")
@Delete ("@OutDrive:@SubDir\\ENVISION\\ENVISION.PXW")
@Delete ("@OutDrive:@SubDir\\PIXTRAN\\ENVISION.PXW")
@Delete ("@OutDrive:@SubDir\\DYNADRV.INI")
@Delete ("@OutDrive:@SubDir\\ENVIS10.386")
@Delete ("@OutDrive:@SubDir\\ENVIS11.386")
@Delete ("@OutDrive:@SubDir\\TWAIN.LOG")
@Delete ("@OutDrive:@SubDir\\TWAIN001.MTX")
@Delete ("@OutDrive:@SubDir\\TWUNK002.MTX")
@Delete ("@OutDrive:@SubDir\\TWUNK003.MTX")

@RmDir ("@OutDrive:@Subdir\\ENVISION")
@RmDir ("@OutDrive:@Subdir\\TWAIN")
@RmDir ("@OutDrive:@Subdir\\TWAIN32")
@RmDir ("@OutDrive:@Subdir\\TWAIN_32")

@EndIf

@Display

DynaScan Twain Version @Version Installation

Envisions Solutions Technology, Inc

Select OK to Continue

@Pause

@EndDisplay


@DefineDisk
	@Label = "DynaScan Disk #1"
	@BeginLib DYNA301.001
@If (@WinMajor <= 3)
                @F 0 @S 640000 @O TWAIN\DYNA16.DS
                @F 1 @S 640000 @O TWAIN32\DYNA32.DS
                @F 2 @S 104448 @O TWAIN32.DLL
                @F 3 @S 27 @O DYNA32.INI
                @F 4 @S 1256 @O DYNA32D.INI
                @F 5 @S 1254 @O DYNADEF.INI
                @F 6 @S 335808 @O DYNASCAN.DLL
                @F 7 @S 27 @O DYNASCAN.INI
                @F 8 @S 33408 @O TWAIN.DLL
                @F 9 @S 73728 @O UFILE32.DLL
@EndIf
                @F 7 @S 27 @O ENVISION\DYNASCAN.301

@If (@WinMajor >= 4)
                @F A @S 649728 @O TWAIN\DYNA16.DS
                @F B @S 658432 @O TWAIN_32\DYNA_32.DS
@EndIf


	@EndLib
@EndDisk

@Copy ("@InDrive:\\Setup.exe", "@OutDrive:@Subdir\\ENVISION\\SETUP.EXE")

@Chain("DynaScan Disk #2")

/* end-of-file */
