home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Popular Mechanics - New Car Buyers Guide 1995
/
Popular_Mechanics_New_Car_Buyers_Guide_1995_Books_That_Work_1994.iso
/
setup
/
carguide.mst
< prev
next >
Wrap
Text File
|
1995-01-20
|
25KB
|
777 lines
'**************************************************************************
'*
'* CARGUIDE.MST - Car & Truck Setup Script
'*
'**************************************************************************
'' Global variables
GLOBAL TitleName$
GLOBAL TheTitleName$
GLOBAL CapTheTitleName$
GLOBAL FullName$
GLOBAL SeriesName$
GLOBAL TitleVersion$
GLOBAL ShortName$
GLOBAL MVBFileName$
GLOBAL ProgManGroup$
GLOBAL ProgManItem$
GLOBAL DefaultPath$
GLOBAL BTWDir$
GLOBAL TitleDir$
GLOBAL HowToDir$
GLOBAL ProgramDir$
GLOBAL DataDir$
GLOBAL CDDrive$
GLOBAL CDTitleDir$
GLOBAL SetupSrcDir$
GLOBAL ModemRegDir$
GLOBAL PromosDir$
GLOBAL SystemDir$
'' ****************************************************************
'' ** Setup Variables
'' ****************************************************************
TitleName$ = "New Car Buyers Guide"
TheTitleName$ = "the " + TitleName$
CapTheTitleName$ = "The " + TitleName$
FullName$ = "Popular Mechanics New Car Buyers Guide - 1995"
SeriesName$ = "Home Survival Toolkit"
TitleVersion$ = "1.11"
MVBFileName$ = "CARFIRST"
ShortName$ = "CARGUIDE"
ProgManGroup$ = "Books That Work"
ProgManItem$ = TitleName$
'***********************************************************************
'** Mainline
'***********************************************************************
GLOBAL CUIDLL$
'' Include files
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'msdetect.inc'
'$INCLUDE 'msregdb.inc'
'' Custom UI dll
CUIDLL$ = "mscuistf.dll"
'' Dialog ID's
CONST DESTPATH = 1000
CONST APPHELP = 2000
CONST TOOBIG = 3000
CONST BADPATH = 4000
CONST SUCCESS = 5000
CONST WELCOME = 6000
CONST NOWIN31 = 7000
CONST TOOBIG2 = 8000
CONST SYSREQ = 9000
CONST BBOARDCD = 18000
CONST TTDISABLED = 23000
CONST NOENHANCED = 25000
CONST NO386 = 26000
CONST MODEMREG = 27000
'' Bitmap ID
CONST LOGO = 1
'' Functions and subroutines
DECLARE FUNCTION AddFont LIB "mscuistf.dll" (szFont$, szName$) AS INTEGER
DECLARE FUNCTION IsTrueTypeEnabled LIB "mscuistf.dll" () AS INTEGER
DECLARE SUB RestartWindows LIB "mscuistf.dll"
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE FUNCTION GetTitleDir (szDefault$) AS STRING
DECLARE FUNCTION CopyFiles(szTitleDir$) AS INTEGER
DECLARE SUB UpgradeBTWIni
DECLARE SUB BTWMaximize LIB "mscuistf.dll" (iHwnd%)
DECLARE SUB RegisterFont(fontfile$, fontname$)
DECLARE SUB ModifyBTWIni
DECLARE SUB ModifyViewerIni
DECLARE SUB RegisterCustomFonts
DECLARE SUB ModifyProgramManager
DECLARE SUB ModifyRegDatabase
DECLARE SUB ShowSuccess
DECLARE SUB AddBillboards
DECLARE FUNCTION ShowWelcome AS INTEGER
DECLARE FUNCTION CheckWindowsVersion AS INTEGER
DECLARE SUB DoModemRegistration
'' The following statement turns size checking off. Set it to scmOnFatal
'' to enable size checking, where Setup will compare the disk file size
'' with the INF file size and report an error if they are not the same.
i% = SetSizeCheckMode(scmOnFatal)
'' Set the title and banner bitmap. You must rebuild MSCUISTF.DLL to
'' alter the banner bitmap.
BTWMaximize(HwndFrame())
SetTitle FullName$
SetBitmap CUIDLL$, LOGO
'' Welcome dialog
IF ShowWelcome() = 0 THEN
GOTO QUIT
ENDIF
'' Check windows version
IF CheckWindowsVersion() = 0 THEN
GOTO QUIT
ENDIF
'' Upgrade the BTW.INI file from Deck format to new format.
UpgradeBTWIni
'' Decide where to put title files
DefaultPath$ = GetIniKeyString("BTW.INI", "General", "BTW Directory")
IF DefaultPath$ = "" THEN
GetLocalHardDrivesList("LocalHardDrives")
szLocalHardDrive$ = GetListItem("LocalHardDrives", 1)
IF szLocalHardDrive$ = "" THEN
szLocalHardDrive$ = "C"
ENDIF
DefaultPath$ = szLocalHardDrive$ + ":\BTW"
ENDIF
TRYAGAIN:
BTWDir$ = GetTitleDir(DefaultPath$)
IF BTWDir$ = "" THEN
GOTO QUIT
ENDIF
TitleDir$ = MakePath(BTWDir$, ShortName$)
CDDrive$ = MID$(GetSymbolValue("STF_SRCDIR"), 1, 1)
CDTitleDir$ = GetSymbolValue("STF_SRCDIR")
HowToDir$ = MakePath(CDTitleDir$, "HOWTO")
ProgramDir$ = MakePath(CDTitleDir$, "SHOWROOM")
DataDir$ = MakePath(CDTitleDir$, "DATA")
ModemRegDir$ = MakePath(BTWDir$, "MODEMREG")
PromosDir$ = MakePath(BTWDir$, "PROMOS")
SetupSrcDir$ = MakePath(GetSymbolValue("STF_SRCDIR"), "SETUP")
'' If Windows is shared, place system files in the Windows directory.
IF IsWindowsShared() = 1 THEN
SystemDir$ = GetWindowsDir()
ELSE
SystemDir$ = GetWindowsSysDir()
ENDIF
'' Read in the INF file.
ReadInfFile GetSymbolValue("STF_CWDDIR") + ShortName$ + ".INF"
'' Copy files
iVal% = CopyFiles(TitleDir$)
IF iVal% = 0 THEN
GOTO QUIT
ELSEIF iVal% = -1 THEN
GOTO TRYAGAIN
ENDIF
'' Register in BTW.INI
ModifyBTWIni
'' Register in VIEWER.INI
ModifyViewerIni
'' Modify Program Manager
ModifyProgramManager
'' Add entries to registration database.
ModifyRegDatabase
'' Register custom fonts.
'' This must be last, since it may restart Windows!!!
RegisterCustomFonts
'' Modem registration
DoModemRegistration
'' Success dialog
ShowSuccess
QUIT:
END
'*************************************************************************
'** Purpose:
'** Puts up a welcome dialog
'*************************************************************************
FUNCTION ShowWelcome () STATIC AS INTEGER
WELCOME:
SetSymbolValue "String", TheTitleName$
SetSymbolValue "String1", FullName$
sz$ = UIStartDlg(CUIDLL$, WELCOME, "FInfoDlgProc", APPHELP, "FHelpDlgProc")
IF sz$ = "CONTINUE" THEN
ShowWelcome = 1
ELSEIF sz$ = "REACTIVATE" THEN
GOTO WELCOME
ELSE
ShowWelcome = 0
ENDIF
UIPop 1
END FUNCTION
'*************************************************************************
'** Purpose:
'** Check the windows version
'*************************************************************************
FUNCTION CheckWindowsVersion () STATIC AS INTEGER
IF GetProcessorType() < 3 THEN
NO386:
SetSymbolValue "String", TheTitleName$
SetSymbolValue "String1", TheTitleName$
sz$ = UIStartDlg(CUIDLL$, NO386, "FInfoDlgProc", SYSREQ, "FHelpDlgProc")
IF sz$ = "REACTIVATE" THEN
GOTO NO386
ENDIF
UIPop 1
CheckWindowsVersion = 0
ELSEIF GetWindowsMajorVersion() < 3 OR GetWindowsMinorVersion() < 10 THEN
NOWIN31:
SetSymbolValue "String", TheTitleName$
SetSymbolValue "String1", CapTheTitleName$
SetSymbolValue "String2", LTRIM$(STR$(GetWindowsMajorVersion())) + "." + LTRIM$(STR$(GetWindowsMinorVersion()))
sz$ = UIStartDlg(CUIDLL$, NOWIN31, "FInfoDlgProc", SYSREQ, "FHelpDlgProc")
IF sz$ = "REACTIVATE" THEN
GOTO NOWIN31
ENDIF
UIPop 1
CheckWindowsVersion = 0
ELSEIF GetWindowsMode() < 2 THEN
NOENHANCED:
SetSymbolValue "String", TheTitleName$
SetSymbolValue "String1", TheTitleName$
sz$ = UIStartDlg(CUIDLL$, NOENHANCED, "FInfoDlgProc", SYSREQ, "FHelpDlgProc")
IF sz$ = "REACTIVATE" THEN
GOTO NOENHANCED
ENDIF
UIPop 1
CheckWindowsVersion = 0
ELSE
CheckWindowsVersion = 1
ENDIF
END FUNCTION
'*************************************************************************
'** Purpose:
'** Prompts the user for a path for the title files
'** Arguments:
'** szDefault$ - default path
'** Returns:
'** New valid path name, or "" if the user quit.
'*************************************************************************
FUNCTION GetTitleDir (szDefault$) STATIC AS STRING
SetSymbolValue "String", TheTitleName$
SetSymbolValue "EditTextIn", szDefault$
SetSymbolValue "EditFocus", "ALL"
GETPATH:
sz$ = UIStartDlg(CUIDLL$, DESTPATH, "FEditDlgProc", APPHELP, "FHelpDlgProc")
IF sz$ = "CONTINUE" THEN
szTitleDir$ = GetSymbolValue("EditTextOut")
IF IsDirWritable(szTitleDir$) = 0 THEN
BADPATH:
SetSymbolValue "String", TheTitleName$
sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfoDlgProc", APPHELP, "FHelpDlgProc")
IF sz$ = "REACTIVATE" THEN
GOTO BADPATH
ENDIF
UIPop 1
GOTO GETPATH
ENDIF
UIPop 1
CreateDir szTitleDir$, cmoNone
ELSEIF sz$ = "REACTIVATE" THEN
GOTO GETPATH
ELSE
szTitleDir$ = ""
ENDIF
GetTitleDir = szTitleDir$
END FUNCTION
'*************************************************************************
'** Purpose:
'** Add billboards to the billboard list
'*************************************************************************
SUB AddBillboards STATIC
ClearBillBoardList
AddToBillBoardList CUIDLL$, BBOARDCD, "FModelessDlgProc",10
END SUB
'*************************************************************************
'** Purpose:
'** Copies the files in the INF file
'** Arguments:
'** szTitleDir$ - destination directory for the title files
'** Returns
'** 1 if files were copied, 0 otherwise
'*************************************************************************
FUNCTION CopyFiles(szTitleDir$) STATIC AS INTEGER
'' Check size
szExtras$ = "Extra"
szCosts$ = "Costs"
szNeededs$ = "Neededs"
FOR i% = 1 TO 26 STEP 1
AddListItem szExtras$, "0"
NEXT i%
'' Add all system files to the copy list
ClearCopyList
AddSectionFilesToCopyList "System Files", SetupSrcDir$, SystemDir$
'' Get the amount of space required in the windows system directory.
StillNeed& = GetCopyListCost(szExtras$, szCosts$, szNeededs$)
'' Put up a message if there is not enough space.
FOR i% = 1 TO 26 STEP 1
IF VAL(GetListItem(szNeededs$, i%)) > 0 THEN
SetSymbolValue "String", TheTitleName$
SetSymbolValue "String1", LTRIM$(STR$(VAL(GetListItem(szCosts$, i%)) / 1024))
SetSymbolValue "String2", CHR$(i% - 1 + ASC("A"))
TOOBIG:
sz$ = UIStartDlg(CUIDLL$, TOOBIG, "FInfoDlgProc", SYSREQ, "FHelpDlgProc")
IF sz$ = "CONTINUE" THEN
CopyFiles = -1
ELSEIF sz$ = "REACTIVATE" THEN
GOTO TOOBIG
ELSE
CopyFiles = 0
ENDIF
UIPop 1
GOTO DONTCOPY
ENDIF
NEXT i%
'' We assume that the changes to WIN.INI are negligible,
'' VIEWER.INI will take 4K, and the Program Manager group file
'' will take another 4K.
'' BUG FIX!!!
'' This line apears to cause the dreaded "symtab" bug, which happens
'' when ReplaceListItem is called with an index that is out of range.
'' On some machines GetWindowsDir must return a lower-case letter
'' (or a non-letter) causing this to screw up.
'' We decided just to comment this out rather than fix it.
'' -- mself 1/11/94
'' ReplaceListItem szExtras$, ASC(MID$(GetWindowsDir(), 1, 1)) - ASC("A") + 1, STR$(8192)
'' Add all of the title files to the copy list
AddSectionFilesToCopyList "Title Files", SetupSrcDir$, TitleDir$
'' Add all of the modem reg files to the copy list
AddSectionFilesToCopyList "Modem Reg Files", SetupSrcDir$, ModemRegDir$
'' Add all of the promo files to the copy list
AddSectionFilesToCopyList "Promo Files", SetupSrcDir$, PromosDir$
'' Get total amount of space required on all drives.
StillNeed& = GetCopyListCost(szExtras$, szCosts$, szNeededs$)
'' Put up a message if there is not enough space.
FOR i% = 1 TO 26 STEP 1
IF VAL(GetListItem(szNeededs$, i%)) > 0 THEN
SetSymbolValue "String", TheTitleName$
SetSymbolValue "String1", LTRIM$(STR$(VAL(GetListItem(szCosts$, i%)) / 1024))
SetSymbolValue "String2", CHR$(i% - 1 + ASC("A"))
TOOBIG2:
sz$ = UIStartDlg(CUIDLL$, TOOBIG2, "FInfoDlgProc", SYSREQ, "FHelpDlgProc")
IF sz$ = "CONTINUE" THEN
CopyFiles = -1
ELSEIF sz$ = "REACTIVATE" THEN
GOTO TOOBIG2
ELSE
CopyFiles = 0
ENDIF
UIPop 1
GOTO DONTCOPY
ENDIF
NEXT i%
'' Add the billboards.
'' AddBillboards
'' Move the copy gauge out of the way of the billboards.
'' SetCopyGaugePosition 3,120
'' Copy the files.
CopyFilesInCopyList
CopyFiles = 1
DONTCOPY:
END FUNCTION
'*************************************************************************
'** Purpose:
'** Puts up a success dialog
'*************************************************************************
SUB ShowSuccess STATIC
SUCCESS:
SetSymbolValue "String1", TheTitleName$
SetSymbolValue "String2", TheTitleName$
sz$ = UIStartDlg(CUIDLL$, SUCCESS, "FInfoDlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO SUCCESS
ENDIF
UIPop 1
END SUB
'*************************************************************************
'** Purpose:
'** Appends a file name to the end of a directory path,
'** inserting a backslash character as needed.
'** Arguments:
'** szDir$ - full directory path (with optional ending "\")
'** szFile$ - filename to append to directory
'** Returns:
'** Resulting fully qualified path name.
'*************************************************************************
FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
IF szDir$ = "" THEN
MakePath = szFile$
ELSEIF szFile$ = "" THEN
MakePath = szDir$
ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
MakePath = szDir$ + szFile$
ELSE
MakePath = szDir$ + "\" + szFile$
ENDIF
END FUNCTION
'*************************************************************************
'** Purpose:
'** Upgrades the BTW.INI file from the Deck format to the new format.
'*************************************************************************
SUB UpgradeBTWIni STATIC
szIni$ = MakePath(GetWindowsDir(), "BTW.INI")
IF DoesIniSectionExist("WIN.INI", "Books That Work") THEN
szBTWDir$ = GetIniKeyString("WIN.INI", "Books That Work", "BTW Directory")
IF szBTWDir$ <> "" THEN
CreateIniKeyValue szIni$, "General", "BTW Directory", szBTWDir$, cmoOverwrite
ENDIF
RemoveIniSection "WIN.INI", "Books That Work", cmoNone
ENDIF
szBTWDir$ = GetIniKeyString(szIni$, "General", "BTW Directory")
IF szBTWDir$ <> "" THEN
szOldIni$ = MakePath(szBTWDir$, "BTW.INI")
szVer$ = GetIniKeyString(szOldIni$, "Versions", "Deck Program")
IF szVer$ <> "" THEN
CreateIniKeyValue szIni$, "Titles", "DECK", szVer$, cmoOverwrite
CreateIniKeyValue szIni$, "DECK", "Title", "Design & Build Your Deck", cmoOverwrite
CreateIniKeyValue szIni$, "DECK", "Series", "Home & Yard", cmoOverwrite
CreateIniKeyValue szIni$, "DECK", "Version", szVer$, cmoOverwrite
CreateIniKeyValue szIni$, "DECK", "Path", MakePath(szBTWDir$, "DECK"), cmoOverwrite
ENDIF
RemoveFile szOldIni$, cmoForce
ENDIF
END SUB
'*************************************************************************
'** Purpose:
'** Registers title in BTW.INI
'*************************************************************************
SUB ModifyBTWIni STATIC
szIni$ = MakePath(GetWindowsDir(), "BTW.INI")
'' Record the BTW Directory in BTW.INI
CreateIniKeyValue szIni$, "General", "BTW Directory", BTWDir$, cmoOverwrite
'' Record the title version info in BTW.INI
CreateIniKeyValue szIni$, "Titles", ShortName$, TitleVersion$, cmoOverwrite
CreateIniKeyValue szIni$, ShortName$, "Title", FullName$, cmoOverwrite
CreateIniKeyValue szIni$, ShortName$, "Series", SeriesName$, cmoOverwrite
CreateIniKeyValue szIni$, ShortName$, "Version", TitleVersion$, cmoOverwrite
CreateIniKeyValue szIni$, ShortName$, "Path", TitleDir$, cmoOverwrite
CreateIniKeyValue szIni$, ShortName$, "CDPath", CDTitleDir$, cmoOverwrite
CreateIniKeyValue szIni$, ShortName$, "ProgramPath", ProgramDir$, cmoOverwrite
CreateIniKeyValue szIni$, ShortName$, "DataPath", DataDir$ + "\", cmoOverwrite
END SUB
'*************************************************************************
'** Purpose:
'** Registers a font.
'** Arguments:
'** fontfile$ - font filename
'** fontname$ - font name.
'*************************************************************************
SUB RegisterFont(fontfile$, fontname$) STATIC
'' A simple error catching wrapper around AddFont, which is a 'C' routine in MSCUISTF.DLL
IF AddFont(fontfile$, fontname$) = -1 THEN
j% = DoMsgBox("Could not install " + fontfile$ + " font.", "Viewer Font Installation", 0)
ENDIF
END SUB
'*************************************************************************
'** Purpose:
'** Registers title in VIEWER.INI
'*************************************************************************
SUB ModifyViewerIni STATIC
'' Get the VIEWER.INI file
szIni$ = MakePath(GetWindowsDir(), "VIEWER.INI")
'' First register the title file, setting the Name and Path entries.
''
'' CUSTOMIZATION: If you're installing multiple MVB files, copy the
'' following two statements for each additional file, substituting
'' the appropriate long name and MVB filename for the TitleName$
'' and MVBFileName$ variables.
CreateIniKeyValue szIni$, ShortName$, "Name", TitleName$, cmoOverwrite
CreateIniKeyValue szIni$, ShortName$, "Path", CDTitleDir$, cmoOverwrite
'' Now we have to register the MVB file in the [FILES] section, so
'' Viewer can find files that are not on the path and display a
'' special message when a file is not found.
CreateIniKeyValue szIni$, "FILES", "CTL3D.DLL", SystemDir$ + "," + "Please reinstall " + TheTitleName$ + ".", cmoOverwrite
CreateIniKeyValue szIni$, "FILES", "MMP.DLL", SystemDir$ + "," + "Please reinstall " + TheTitleName$ + ".", cmoOverwrite
CreateIniKeyValue szIni$, "FILES", "MVAPI2.DLL", SystemDir$ + "," + "Please reinstall " + TheTitleName$ + ".", cmoOverwrite
CreateIniKeyValue szIni$, "FILES", "MVAUDIO.DLL", SystemDir$ + "," + "Please reinstall " + TheTitleName$ + ".", cmoOverwrite
CreateIniKeyValue szIni$, "FILES", "MVBMP2.DLL", SystemDir$ + "," + "Please reinstall " + TheTitleName$ + ".", cmoOverwrite
CreateIniKeyValue szIni$, "FILES", "MVBRKR2.DLL", SystemDir$ + "," + "Please reinstall " + TheTitleName$ + ".", cmoOverwrite
CreateIniKeyValue szIni$, "FILES", "MVFS2.DLL", SystemDir$ + "," + "Please reinstall " + TheTitleName$ + ".", cmoOverwrite
CreateIniKeyValue szIni$, "FILES", "MVFTSUI2.DLL", SystemDir$ + "," + "Please reinstall " + TheTitleName$ + ".", cmoOverwrite
CreateIniKeyValue szIni$, "FILES", "MVMCI2.DLL", SystemDir$ + "," + "Please reinstall " + TheTitleName$ + ".", cmoOverwrite
CreateIniKeyValue szIni$, "FILES", "MVSRCH2.DLL", SystemDir$ + "," + "Please reinstall " + TheTitleName$ + ".", cmoOverwrite
CreateIniKeyValue szIni$, "FILES", "MVTITLE2.DLL", SystemDir$ + "," + "Please reinstall " + TheTitleName$ + ".", cmoOverwrite
CreateIniKeyValue szIni$, "FILES", MVBFileName$ + ".MVB", HowToDir$ + "," + "Please insert the " + TitleName$ + " CD into drive " + CDDrive$ + ".", cmoOverwrite
CreateIniKeyValue szIni$, "FILES", "CARGUIDE.MVB", HowToDir$ + "," + "Please insert the " + TitleName$ + " CD into drive " + CDDrive$ + ".", cmoOverwrite
CreateIniKeyValue szIni$, "FILES", "AAFF10.DLL", HowToDir$ + "," + "Please insert the " + TitleName$ + " CD into drive " + CDDrive$ + ".", cmoOverwrite
CreateIniKeyValue szIni$, "FILES", "CT10.DLL", HowToDir$ + "," + "Please insert the " + TitleName$ + " CD into drive " + CDDrive$ + ".", cmoOverwrite
CreateIniKeyValue szIni$, "FILES", "TOLLFR10.DLL", HowToDir$ + "," + "Please insert the " + TitleName$ + " CD into drive " + CDDrive$ + ".", cmoOverwrite
END SUB
'*************************************************************************
'** Purpose:
'** Creates program manager entries for the title
'*************************************************************************
SUB ModifyProgramManager STATIC
'' Create the program manager group
CreateProgmanGroup ProgmanGroup$, "", cmoNone
ShowProgmanGroup ProgmanGroup$, 1, cmoNone
'' Create an entry for the title
CreateProgmanItem ProgmanGroup$, ProgmanItem$, "MVIEWER2.EXE " + MVBFileName$ + ".MVB", MakePath(TitleDir$, ShortName$ + ".ICO") + ", 0, 0, 0, " + HowToDir$, cmoOverwrite
'' Create an entry for the readme file
CreateProgmanItem ProgmanGroup$, ProgmanItem$ + " Read Me", MakePath(TitleDir$, "README.WRI"), "", cmoOverwrite
'' Create an entry for the modem registration
CreateProgmanItem ProgmanGroup$, "Modem Registration", MakePath(ModemRegDir$, "MODEMREG.EXE"), "", cmoOverwrite
'' Create an entry for the promos.
CreateProgmanItem ProgmanGroup$, "Books That Work Product Sampler", MakePath(PromosDir$, "RUNPROMO.EXE") + " " + MakePath(MakePath(CDTitleDir$, "PROMOS"), "PROMOS.EXE"), "", cmoOverwrite
'' Create an entry for the ads.
CreateProgmanItem ProgmanGroup$, "Free Toyota CD-ROM Offer", MakePath(PromosDir$, "RUNPROMO.EXE") + " " + MakePath(MakePath(MakePath(HowToDir$, "ADS"), "TOYOTA"), "TOYOTA.EXE"), MakePath(TitleDir$, "TOYOTA.ICO"), cmoOverwrite
CreateProgmanItem ProgmanGroup$, "Cadillac Presentation", MakePath(PromosDir$, "RUNPROMO.EXE") + " " + MakePath(MakePath(MakePath(HowToDir$, "ADS"), "CADILLAC"), "CADILLAC.EXE"), MakePath(TitleDir$, "CADILLAC.ICO"), cmoOverwrite
END SUB
'*************************************************************************
'** Purpose:
'** Adds entries to the registration datbase.
'*************************************************************************
SUB ModifyRegDatabase STATIC
'' Create entries for Viewer files (.MVB)
CreateRegKeyValue ".MVB", "MViewer2"
CreateRegKeyValue "MViewer2", "Viewer Files"
CreateRegKeyValue "MViewer2\shell\open\command", "MVIEWER2.EXE %1"
'' Create entries for Car & Truck Showroom Search files (.CAT)
CreateRegKeyValue ".CAT", "CarGuideSearch"
CreateRegKeyValue "CarGuideSearch", "Car & Truck Showroom Search"
CreateRegKeyValue "CarGuideSearch\shell\open\command", MakePath (ProgramDir$, "CTAPP.EXE") + " %1"
CreateRegKeyValue "CarGuideSearch\shell\open\ddeexec", "open(""%1"")"
END SUB
'*************************************************************************
'** Purpose:
'** Registers custom fonts with Windows.
'*************************************************************************
SUB RegisterCustomFonts STATIC
'' CUSTOMIZATION: If you install custom fonts, then add statements
'' in this routine to register the fonts with the current Windows
'' session and to add them to the WIN.INI [Fonts] section.
''
'' Note that TrueType fonts can only be installed in Windows 3.1.
'' RegisterFont automatically creates the required .FOT file for
'' TrueType fonts.
'' Not for this version....
'' RegisterFont "arialbd.ttf", "Arial Bold (TrueType)"
'' RegisterFont "arialbi.ttf", "Arial Bold Italic (TrueType)"
'' Enable TrueType fonts if they aren't already enabled.
'' We have to restart Windows in this case.
IF IsTrueTypeEnabled() = 0 THEN
CreateIniKeyValue "WIN.INI", "TrueType", "TTEnable", "1", cmoOverwrite
TTDISABLED:
SetSymbolValue "String1", CapTheTitleName$
sz$ = UIStartDlg(CUIDLL$, TTDISABLED, "FInfoDlgProc", 0, "")
IF sz$ = "CONTINUE" THEN
RestartWindows
ELSEIF sz$ = "REACTIVATE" THEN
GOTO TTDISABLED
ENDIF
UIPop 1
ENDIF
END SUB
'*************************************************************************
'** Purpose:
'** Ask if the user wants to try modem registration
'*************************************************************************
SUB DoModemRegistration STATIC
mReg% = 0
MODEMREG:
sz$ = UIStartDlg(CUIDLL$, MODEMREG, "FInfoDlgProc", 0, "")
IF sz$ = "CONTINUE" THEN
mReg% = 1
ELSEIF sz$ = "REACTIVATE" THEN
GOTO MODEMREG
ENDIF
UIPop 1
IF mReg% = 1 THEN
Run MakePath(ModemRegDir$, "MODEMREG.EXE") + " -setup"
ENDIF
END SUB