USERCODE2=// Save the install directory~~WriteProfileString("Install", "Path", "%InstallPath%", "%IniFile%")~~WriteProfileString("Install", "Version", "3.08", "%IniFile%")~~~~// Make the temporary directory~~MkDir("%WindowsDirectory%TEMP")~~WriteProfileString("Install", "TempPath", "%WindowsDirectory%TEMP", "%IniFile%")~~~~// Create an extra directory~~MkDir("%InstallPath%SAMPLES")~~
USERCODE3=// Make the Program Manager Group and icons~~MakeGroup("%Application%", "")~~MakeIcon("Setup Builder", "%InstallPath%BUILDER.EXE")~~MakeIcon("Setup Builder Help", "WINHELP %InstallPath%BUILDER.HLP")~~MakeIcon("Setup Script Help", "WINHELP %InstallPath%SETUP.HLP")~~MakeIcon("License Administrator", "%InstallPath%LADMIN.EXE %IniFile%")~~MakeIcon("Install", "A:\SETUP.EXE")~~MakeIcon("ReadMe", "notepad %InstallPath%README.TXT")~~MakeIcon("Install Notes", "notepad %InstallPath%INSTALL.TXT")~~~~// File association~~MessageBox("Setup can install a file association|for File Manager with .INF files.||Do you wish to install this association ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)~~IF %ERROR% == IDNO GOTO :NOASSOC~~WriteProfileString("Extensions", "inf", "%InstallPath%inst.exe ^.inf", "WIN.INI")~~:NOASSOC~~~~// License~~GetProfileString("License", "Registration", "", "%IniFile%", %LStr%)~~IF "%LStr%" != "" GOTO :GOTIT~~GetLicense(%License%)~~WriteProfileString("License", "Registration", "%License%", "%IniFile%")~~:GOTIT~~~~// Tell Setup Builder where to find some files for creating install disks~~WriteProfileString("Executables", "Setup", "%InstallPath%setup.exe", "%IniFile%")~~WriteProfileString("Executables", "Inst", "%InstallPath%inst.exe", "%IniFile%")~~WriteProfileString("Executables", "DibAPI", "%InstallPath%dibapi.dll", "%IniFile%")
USERCODE4=
USERCODE5=MessageBox("Do you wish to view the|extra installation notes ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)~~IF %ERROR% == IDNO GOTO :NONOTES~~~~ChDir("%InstallPath%")~~WinExec("notepad.exe %InstallPath%README.TXT")~~:NONOTES~~
USERCODE6=// Change the backdrop message~~SetBackDropText(1, "| Setup Builder De-Installation", TRUE, TRUE)~~ShowBackdrop("", FALSE, TRUE, FALSE)~~~~// Check to see if the software has been installed correctly~~GetProfileString("Install", "Path", "", "%IniFile%", %InstallPath%)~~IF "%InstallPath%" == "" GOTO :NOTINSTALLED~~~~// Software has been installed~~MessageBox("The %Application% software is about to be removed from your machine.||All files, directories and the appropriate Program Manager Group will be deleted.||Are you sure you wish to continue ?", "%Caption%", MB_YESNO, MB_ICONQUESTION)~~IF %ERROR% == IDYES GOTO :DODELETE~~SET %Message1% = "De-installation aborted - the %Application% software has not been deinstalled."~~SET %Message2% = ""~~DialogBox("OKBOX")~~GOTO :END~~~~:DODELETE~~Delete("%InstallPath%SAMPLES\*.*")~~Delete("%InstallPath%*.*")~~RmDir("%InstallPath%SAMPLES")~~SET %Len% = Len("%InstallPath%") - 1~~SET %InstallPath% = Left("%InstallPath%", %Len%)~~RmDir("%InstallPath%")~~Delete("%WindowsDirectory%%IniFile%")~~Delete("%WindowsDirectory%COMPRESS.EXE")~~Delete("%WindowsDirectory%COMPRESS.TXT")~~DeleteGroup("%Application%")~~~~// Finally file manager item~~WriteProfileString("Extensions", "inf", "", "WIN.INI")~~~~SET %Message1% = "The %Application% software has been successfully de-installed."~~SET %Message2% = "To re-install the %Application% software you should re-run this installation program."~~DialogBox("OKBOX")~~GOTO :END~~~~:NOTINSTALLED~~SET %Message1% = "The %Application% software has not been correctly installed."~~SET %Message2% = "The De-installation procedure is unable to de-install the %Application% software."~~DialogBox("OKBOX")~~GOTO :END