
;***************************************************************************
;* XTreeGold for Windows  Uninstall Script                               *
;* FOR VERSION 3.3 OF SYMANTEC INSTALL FOR WINDOWS                         *
;***************************************************************************

[InstallVersion]
3.1

[process]
Uninstall

;//////////////////////////////
;// SetProduct
;//////////////////////////////

switch01=TRUE   ;XTreeGold for Windows 4.0
;switch01=FALSE ;PCTW File Manager 3.0


;//////////////////////////////
;// Background Bitmaps
;//////////////////////////////


#if(switch01)
    Bitmaps(Pix_XTG)
#else
    Bitmaps(Pix_FM)
#endif


;//////////////////////////////
;// Initialization            
;//////////////////////////////

SetActiveCopy(XTGWinCopy, uninstal.inf)

ResetTarget(SourceTarget)


;//////////////////////////////
;// Verify Full Uninstall  
;//////////////////////////////

#if(switch01)
    switch10 = MessageCancel(FullWarn_xtg)
#else
    switch10 = MessageCancel(FullWarn_fm)
#endif

#ifnot(switch10)
    #if(switch01)
        End(Quit_xtg)
    #else
        End(Quit_fm)
    #endif
#endif

FullUninstall
SelectOption(RequiredFiles)

SourceDrive()                    ; Choose location of XTreeGold for Windows files
ResetTarget(SourceTarget)

switch03 = Exists(WNCPS1)
switch04 = Exists(WNCPS2)

switch05 = FALSE        ;Flat installation

#if(switch03)
    switch05 = TRUE     ;Use Subdir's
#endif

#if(switch04)
    switch05 = TRUE     ;Use subdir's
#endif
                
#if(switch05)    
    ResetTarget(SetDataDirSub)
    ResetTarget(SetLangDirSub)
    ResetTarget(SetSystemDirSub)
#else
    ResetTarget(SetDataDirFlat)
    ResetTarget(SetLangDirFlat)
    ResetTarget(SetSystemDirFlat)
#endif


;//////////////////////////////
;// Delete the files
;//////////////////////////////

DisableUtils()
Uncopy()
#ifnot(switch05)
    Delete(w4wFormats)
#endif    
EnableUtils()


;//////////////////////////////
;// Remove cps3 from win.ini
;//////////////////////////////

DelFromIni(Cps3Entry)


;//////////////////////////////
;// Modify wnfm.ini
;//////////////////////////////


;// Remove Viewer entries from wnfm.ini
switch15 = IsOptionSelected(ViewerFormats)
#if(switch15)
    DelFromIni(UpdateViewerFormats)
#endif

switch16 = IsOptionSelected(Graphics)
#if(switch16)
    DelFromIni(UpdateGraphics)
#endif

switch17 = IsOptionSelected(Database)
#if(switch17)
    DelFromIni(UpdateDatabase)
#endif

switch18 = IsOptionSelected(Spreadsheet)
#if(switch18)
    DelFromIni(UpdateSpreadsheet)
#endif

switch19 = IsOptionSelected(TextViewers)
#if(switch19)
    DelFromIni(UpdateTextViewers)
#endif

switch20 = IsOptionSelected(MiscViewers)
#if(switch20)
    DelFromIni(UpdateMiscViewers)
#endif


;//////////////////////////////
;// Delete program groups
;//////////////////////////////

#if(switch01)
    Groups(Groups_XTG)
#else
    Groups(Groups_FM)
#endif


;//////////////////////////////
;// Remove WNFC from load line
;//////////////////////////////

RemoveFromLoad(RemoveFC)


;//////////////////////////////
;// Remove ZIP from Extensions
;//////////////////////////////

DelFromIni(RemoveZipFromExt)


;//////////////////////////////
;// Delete FSV2 if no CPS2
;//////////////////////////////

switch45 = Exists(ExistsCps2)
#ifnot(switch45)
    Delete(DelFSV2)
#endif


;//////////////////////////////
;// Clean Up
;//////////////////////////////

Delete(Leftovers)
RemoveProgDir()

;//////////////////////////////
;// Say goodbye
;//////////////////////////////

switch13 = IsRebootRequested()  ;have startup files changed?

#if(switch13)
    #if(switch01)
        End(byerebootful_xtg)
    #else
        End(byerebootful_fm)
    #endif
#else
    #if(switch01)
        End(byefull_xtg)
    #else
        End(byefull_fm)
    #endif
#endif


end()


;***************************************************************************
;* SubProc Executed When Install Takes Over As Shell
;***************************************************************************

[SubProc]
Return()


;***************************************************************************
;* Dialog Info                                                             *
;***************************************************************************

[XTGWinCopy:CopyDialog]
caption = "Copying files..."
posx = 0
posy = 0


;***************************************************************************
;* Message Text                                                            *
;***************************************************************************

[FullWarn_xtg]
caption = "Full Uninstall?"
"You are about to perform a full uninstall"
"of XTreeGold for Windows.  This operation"
"will delete all XTreeGold for Windows"
"files from your hard drive.  In order to"
"use XTreeGold for Windows again, you will"
"have to re-install the program.  Are you"
"sure you want to proceed?"

[FullWarn_fm]
caption = "Full Uninstall?"
"You are about to perform a full uninstall"
"of PC Tools for Windows File Manager 3.0."
"This operation will delete all PCTW File"
"Manager files from your hard drive.  In"
"order to use PCTW File Manager again, you"
"will have to re-install the program.  Are"
"you sure you want to proceed?"

[SourceDrive]
caption = "Uninstall from..."
defpath = C:\CPS

[cancel]
caption = "Exit Uninstall?"
text    = "Are you sure that you want to exit?"

[cancelshell]
caption = "Exit Unnstall?"
"You have chosen to cancel the Uninstall"
"program. In order to reset the Windows"
"environment, Install will also close"
"Windows. Are you sure you want to exit?"

[FileCopy]
copycaption             = "Installing Files"
errorcaption    = "Error Copying Files"
insertcaption   = "Insert Diskette"
Message                 = MessageText

[Quit_xtg]
caption = "Cancel Uninstall"
"XTreeGold for Windows will not be"
"removed from your hard drive."
" "
"Please select one of the exit"
"options below."

[Quit_fm]
caption = "Cancel Uninstall"
"XTreeGold for Windows will not be"
"removed from your hard drive."
" "
"Please select one of the exit"
"options below."

[bye_xtg]
caption = "Uninstall complete"
"XTreeGold for Windows has"
"been removed from your hard drive."
" "
"Please select one of the exit"
"options below."

[byereboot_xtg]
caption = "Uninstall complete"
"XTreeGold for Windows has"
"been removed from your hard drive."
" "
"Please select one of the exit"
"options below.  Since changes"
"were made to your startup files,"
"we recommend that you choose the"
"Reboot option."

[byefull_xtg]
caption = "Uninstall complete"
"XTreeGold for Windows has been completely"
"removed from your hard drive.  Please"
"select one of the exit options below."

[byerebootful_xtg]
caption = "Uninstall complete"
"XTreeGold for Windows has been completely"
"removed from your hard drive.  Please"
"select one of the exit options below."
"Since changes were made to your"
"startup files, we recommend that you"
"choose the Reboot option."

[bye_fm]
caption = "Uninstall complete"
"PCTW File Manager 3.0 has"
"been removed from your hard drive."
" "
"Please select one of the exit"
"options below."

[byereboot_fm]
caption = "Uninstall complete"
"PCTW File Manager 3.0 has"
"been removed from your hard drive."
" "
"Please select one of the exit"
"options below.  Since changes"
"were made to your startup files,"
"we recommend that you choose the"
"Reboot option."

[byefull_fm]
caption = "Uninstall complete"
"PCTW File Manager 3.0 has been completely"
"removed from your hard drive.  Please"
"select one of the exit options below."

[byerebootful_fm]
caption = "Uninstall complete"
"PCTW File Manager 3.0 has been completely"
"removed from your hard drive.  Please"
"select one of the exit options below."
"Since changes were made to your"
"startup files, we recommend that you"
"choose the Reboot option."

[NotImplemented]
caption = "Feature Not Implemented"
"This feature has not yet been implemented."


;***************************************************************************
;* System.ini Additions                                                    *
;***************************************************************************


;***************************************************************************
;* System.ini Deletions                                                    *
;***************************************************************************


;***************************************************************************
;* Win.ini Additions                                                       *
;***************************************************************************


;***************************************************************************
;* Win.ini Deletions                                                       *
;***************************************************************************

[Cps3Entry]
IniName = win.ini
SectionName = CPS
cps3 = *

[RemoveFC]
wnfc.exe

[RemoveZipFromExt]
IniName = win.ini
SectionName = extensions
zip = *wnfm.exe*


;***************************************************************************
;* wnfm.ini Modifications                                               *
;***************************************************************************

[UpdateFileComp]
IniName = %s\wnfm.ini, TARGET2
SectionName = FileCompanions
"&Copy File"="WNAPCPY.EXE %file% /DEFD=%dir% /TOP /MI-"
"&Move File"="WNAPMOV.EXE %file% /DEFD=%dir% /TOP /MI-"
"&Rename File"="WNAPREN.EXE %file% /DEFD=%dir% /TOP /MI-"
"&Delete File"="WNAPDEL.EXE %file% /DEFD=%dir% /TOP /MI-"
"C&ompress File"="WNAPCMP.EXE %file% /DEFD=%dir% /TOP /MI-"
"&Expand File"="WNAPEXP.EXE %file% /DEFD=%dir% /TOP /MI-"
"&View File"="WNFV.EXE %file% /DEFD=%dir% /TOP"
"Cre&ate Directory"="WNAPMKD.EXE /DEFD=%dir% /TOP /MI-"
"&Format Disk"="WNAPFMT.EXE %drive% /TOP /MI-"
"&SmartFind"="WNFM /SF %dir%"
"C&lose File Companions"=dummy.exe
ectionName = FileCompanionDlgs
CommonDlgOpen="COMMDLG.DLL,,,FileOpenDlgProc,,,,,,,1152,1088,1121"
CommonDlgSave="COMMDLG.DLL,,,FileSaveDlgProc,,,,,,,1152,1088,1121"
FileDlgsBrowse2=",,,,CPS_FileList2,112,CPS_DirTree2,109,,,105,106,100"
FileDlgsBrowse3=",,,,CPS3_FileList,112,CPS3_DirTree,109,,,105,106,100"
MSExcel5=",bosa_sdm_XL,,,EDTBX,4864,,,,,4864,,"
MSWord6=",bosa_sdm_Microsoft Word 6.0,,,OpusFedt,1818,,,,,1818,,"
AmiPro="AMIPROUI.DLL,,,,static,50,,,,,60,50,"
QuattroProFile=",QPWDialogWdw,File,,,,,,,,,,"
QuattroProWS=",QPWDialogWdw,Workspace,,,,,,,,,,"

[UpdateViewerFormats]
IniName = %s\wnfm.ini, TARGET2
SectionName = "ScreenCapture3.FormatLibs"
WNTLDTH3.dll="Dithering Transformation Library"
SectionName = "Viewer3.ClipFormatLibs"
wnfl2bm3.dll="Vector-to-DIB conversion library"
SectionName = "Viewer3.FormatLibs"
WNTLDTH3.dll="Dithering Transformation Library"
wnfl2bm3.dll="Vector-to-DIB conversion library"

[UpdateTextViewers]
IniName = %s\wnfm.ini, TARGET2
SectionName = "Viewer3.ClipFormatLibs"
wnfltxt3.dll="TXT,DOC,BAT,INI,RTF: Plain text"
wnflrtf3.dll="RTF: Rich Text Format"
SectionName = "Viewer3.FormatLibs"
wnflfon3.dll="FON,FOT,TTF: Font Viewer"
wnflrtf3.dll="RTF: Rich Text Format"
wnflwri3.dll="WRI: Windows Write"
wnflwfw3.dll="DOC,DOX,SAM,TXT,WP: Formatted text viewers hub"
wnfltxt3.dll="TXT,DOC,BAT,INI,RTF: Plain text"

[UpdateMiscViewers]
IniName = %s\wnfm.ini, TARGET2
SectionName = "Viewer3.FormatLibs"
wnfldsk3.dll="DSK: PC Tools DiskCopy Image File"
wnflexe3.dll="EXE,DLL,CPL,RSL,DRV,386: Executable file viewer"
wnflwav3.dll="WAV: Waveform Audio File Format"
wnflzip3.dll="ZIP,ARC,PAK,ZOO,LZH: Archive formats"
wnflhex3.dll="Hex file viewer"

[UpdateGraphics]
IniName = %s\wnfm.ini, TARGET2
SectionName = "ScreenCapture3.FormatLibs"
wnflbmp3.dll="BMP,DIB,RLE: Windows 2 & 3, OS/2 Bitmap"
wnflgif3.dll="GIF: Compuserve Graphics Interchange Format"
wnfltif3.dll="TIF: Tagged Image File Format"
SectionName = "Viewer3.ClipFormatLibs"
wnflbmp3.dll="BMP,DIB,RLE: Windows 2 & 3, OS/2 Bitmap"
SectionName = "Viewer3.FormatLibs"
wnflbmp3.dll="BMP,DIB,RLE: Windows 2 & 3, OS/2 Bitmap"
wnflcdr3.dll="CDR: Corel Draw 2.x, 3.0"
wnflcgm3.dll="CGM,GMF: Computer Graphics Metafile"
wnflhgr3.dll="CH3,SY3: Harvard Graphics Chart"
wnfldrw3.dll="DRW: Micrografx Drawing"
wnfldxf3.dll="DXF: Autodesk Image"
wnfleps3.dll="EPS: Encapsulated PostScript"
wnflgif3.dll="GIF: Compuserve Graphics Interchange Format"
wnflicl3.dll="ICL,NIL: Windows 3.x Icon Library"
wnflico3.dll="ICO: Windows 3.x Icon"
wnflimg3.dll="IMG: GEM Bitmap"
wnfljpg3.dll="JPEG/JFIF"
wnflmac3.dll="MAC: MacPaint"
wnflmsp3.dll="MSP: Microsoft Paint"
wnflpcx3.dll="PCX,PCC: PC Paintbrush"
wnflpic3.dll="PIC: Lotus Picture"
wnfltif3.dll="TIF: Tagged Image File Format"
wnflwmf3.dll="WMF: Windows Metafile"
wnflwpg3.dll="WPG: WordPerfect Graphics"
wnfldwg3.dll="DWG: AutoCAD Drawing"

[UpdateDatabase]
IniName = %s\wnfm.ini, TARGET2
SectionName = "Viewer3.FormatLibs"
wnflpdx3.dll="DB:  Paradox Database"
wnfldbf3.dll="DBF: dBase II, III, IV"

[UpdateSpreadsheet]
IniName = %s\wnfm.ini, TARGET2
SectionName = "Viewer3.ClipFormatLibs"
wnflcsv3.dll="CSV,DLM: Comma Separated Value"
SectionName = "Viewer3.FormatLibs"
wnflcsv3.dll="CSV,DLM: Comma Separated Value"
wnflqpw3.dll="WB1: Quattro Pro for Windows"
wnflwk33.dll="WK3: Lotus 1-2-3 rls. 3"
wnflwks3.dll="WKS,WK1: Lotus 1-2-3 rls. 1a & rls. 2"
wnflqp3.dll="WKQ,WQ1: Quattro Pro for DOS"
wnflxls3.dll="XLS,XLC,XLM: Microsoft Excel v. 2, 3, 4"

[CpsSection]
IniName = %s\wnfm.ini, TARGET2
SectionName = CPS
BaseDir = %s,TARGET
DataDir = %s,TARGET2
LanguageDir = %s,TARGET3
SystemDir = %s,TARGET4


;***************************************************************************
;* Ini Verifications                                                       *
;***************************************************************************


;***************************************************************************
;* File Exist verifications
;***************************************************************************

[ExistsCps2]
wncps2.dll,     TARGET

[wncps1]
wncps1.dll, TARGET

[wncps2]
wncps2.dll, TARGET


;***************************************************************************
;* Delete Files                                                            *
;***************************************************************************

[Leftovers]
wnfm.ini,       TARGET2
wnfme.ems,      TARGET2
wnfv.ems,       TARGET2
smartchk.cps,   TARGET
chklist.cps,    TARGET
smartchk.cps,   TARGET2
chklist.cps,    TARGET2
smartchk.cps,   TARGET3
chklist.cps,    TARGET3
smartchk.cps,   TARGET4
chklist.cps,    TARGET4
smartchk.cps,   SYSTEM
chklist.cps,    SYSTEM
smartchk.cps,   WINDOWS
chklist.cps,    WINDOWS
pipeline.ini,   TARGET
pipedlg.dat,    TARGET
modem.id,   TARGET
$flecomp.tmp,   TARGET
modem.id,   TARGET2
$flecomp.tmp,   TARGET2
setup.exe,      TARGET
setup.exe,      SYSTEM
wnfclib.dll,    TARGET
wnw4w51f.dll,   TARGET4
wnw4w60f.dll,   TARGET4

[DelFSV2]
wnfsv2.dll,     TARGET
wnfsvt2.exe,    TARGET

[AVFiles]
smartchk.cps,   TARGET
chklist.cps,    TARGET
smartchk.cps,   TARGET2
chklist.cps,    TARGET2
smartchk.cps,   TARGET3
chklist.cps,    TARGET3
smartchk.cps,   TARGET4
chklist.cps,    TARGET4
smartchk.cps,   SYSTEM
chklist.cps,    SYSTEM
smartchk.cps,   WINDOWS
chklist.cps,    WINDOWS

[w4wFormats]
wnw4w04f.dll,   TARGET4
wnw4w05f.dll,   TARGET4
wnw4w06f.dll,   TARGET4
wnw4w07f.dll,   TARGET4
wnw4w08f.dll,   TARGET4
wnw4w09f.dll,   TARGET4
wnw4w10f.dll,   TARGET4
wnw4w15f.dll,   TARGET4
wnw4w16f.dll,   TARGET4
wnw4w17f.dll,   TARGET4
wnw4w23f.dll,   TARGET4
wnw4w28f.dll,   TARGET4
wnw4w32f.dll,   TARGET4
wnw4w33f.dll,   TARGET4
wnw4w39f.dll,   TARGET4
wnw4w44f.dll,   TARGET4
wnw4w48f.dll,   TARGET4
wnw4w49f.dll,   TARGET4
wnw4w51f.dll,   TARGET4
wnw4w52f.dll,   TARGET4
wnw4w54f.dll,   TARGET4
wnw4w60f.dll,   TARGET4


;***************************************************************************
;* External function calls                                                 *
;***************************************************************************

[DisableVSafe]
dll=supp3.dll
function=supp_DisableVSafe

[EnableVSafe]
dll=supp3.dll
function=supp_EnableVSafe


;***************************************************************************
;* Misc install functions                                                  *
;***************************************************************************

[Pix_XTG]
color = %s\bigred.rle
color = %s\xtgpic.rle
color = %s\xtg.rle, 1, 1
color = %s\cpslogo.rle, -1, 1

[Pix_FM]
color = %s\bigred.rle
color = %s\fm.rle, 1, 1
color = %s\cpslogo.rle, -1, 1

[SourceTarget]
reset = TARGET
location = %s, SOURCE

[SetDataDirSub]
Reset   = TARGET2
Location= %s, TARGET

[SetLangDirSub]
Reset   = TARGET3
Location= %s\english, TARGET

[SetSystemDirSub]
Reset   = TARGET4
Location= %s\system, TARGET

[SetDataDirFlat]
Reset   = TARGET2
Location= %s, TARGET

[SetLangDirFlat]
Reset   = TARGET3
Location= %s, TARGET

[SetSystemDirFlat]
Reset   = TARGET4
Location= %s, TARGET

[DataDir]
%s,TARGET2

[LangDir]
%s,TARGET3

[SystemDir]
%s,TARGET4


;***************************************************************************
;* File backup                                                             *
;***************************************************************************


;***************************************************************************
;* Config.sys mods                                                         *
;***************************************************************************


;***************************************************************************
;* Autoexec Mods                                                           *
;***************************************************************************


;***************************************************************************
;* SetShell section                                                        *
;***************************************************************************

[SetShell]
WinIniName = win.ini
SystemIniName = system.ini
Message = MessageBox.SetShellMessage
SysSectionName = boot
WinSectionName = windows
shell = %s\setup.exe
load =
run =
SetShellIfLoaded=
Backup = Backup.SetShellSave
Restore= Backup.SetShellRestore
Active = yes
IfActiveList=LoadedList
SubProcess=SubProc

[SetShellSave]
win.ini, win.siw, WINDOWS, WINDOWS
system.ini, system.siw, WINDOWS, WINDOWS

[SetShellRestore]
system.siw, system.ini, WINDOWS, WINDOWS
win.siw, win.ini, WINDOWS, WINDOWS 

[LoadedList]
setup.exe

[SetShellMessage]
caption = "Uninstall Program"
"Welcome to the Uninstall program."
"Please select OK to allow Uninstall"
"to restart Windows and continue.  Press"
"Cancel to exit Uninstall."

[WindowsVersion]
3.10
"This product requires"
"Windows 3.1 or greater."


;***************************************************************************
;* Groups                                                                  *
;***************************************************************************

[Groups_XTG]
"XTreeGold for Windows 4.0", xtgwin4.grp

[XTreeGold for Windows 4.0]
"Read Me",                      readme.wri,             RequiredFiles
"XTreeGold",                    wnfm.exe,               FileManager, 1,, wnfm.exe, TARGET
"File Companions",              wnfc.exe,               FileCompanions
"File Viewer",                  wnfv.exe,               ViewerApp
"File Compare",                 wnapcom.exe,            FileApplets
"Synchronize Directories",      wnapsyn.exe,            FileApplets
"SmartFind",                    "wnfm.exe /SF",         FileManager, 2,, wnfm.exe, TARGET
"Electronic Registration",      register.exe,           RequiredFiles
"Uninstall XTreeGold for Windows 4.0",    "setup.exe /u",RequiredFiles, 1,, instbin.exe, TARGET

[Groups_FM]
"PCTW File Manager 3.0", pctwfm3.grp

[PCTW File Manager 3.0]
"Read Me",                      readme.wri,             RequiredFiles
"File Manager",                 wnfm.exe,               FileManager
"File Companions",              wnfc.exe,               FileCompanions
"File Viewer",                  wnfv.exe,               ViewerApp
"File Compare",                 wnapcom.exe,            FileApplets
"Synchronize Directories",      wnapsyn.exe,            FileApplets
"SmartFind",                    "wnfm.exe /SF",         FileManager, 2,, wnfm.exe, TARGET
"Electronic Registration",      register.exe,           RequiredFiles
"Uninstall PCTW File Manager 3.0",    "setup.exe /u",RequiredFiles, 1,, instbin.exe, TARGET


;***************************************************************************
;* Copy                                                                    *
;***************************************************************************

[XTGWinCopy]
;SelectionType.ComponentName,   "SelectionDlgText",                             Size,   Required?,      FilesButton?,   ShowItem?

CopyMain.RequiredFiles,                 "Required Files - %ldK",                        0,              Y,      N,      Y

CopyMain.FileManager,                   "File Manager Gold - %ldK",                     0,              N,      N,      Y

CopyMain.OtherStuff,                    "Other Stuff - %ldK",                           0,              N,      Y,      Y
CopySub.ViewerApp,              "File Viewer Application - %ldK",                       0
CopySub.FileCompanions,         "File Companions - %ldK",                       0
CopySub.FileApplets,            "File Accesories - %ldK",                       0

CopyMain.ViewerFormats,         "File Viewers - %ldK",                          0,              N,      Y,      Y
CopySub.Graphics,               "Graphics Viewers - %ldK",                      0
CopySub.TextViewers,            "Text Viewers - %ldK",                          0
CopySub.Spreadsheet,            "Spreadsheet Viewers - %ldK",                           0
CopySub.Database,               "Database Viewers - %ldK",                      0
CopySub.MiscViewers,            "Misc Viewers - %ldK",                          0
