Metropoli BBS
VIEWER: hcuser2.inf MODE: TEXT (CP437)
/*
 * - Installation Hardcopy Simple (der Benutzer gibt alle Angaben vor)
 *
 * letzte ─nderung: xx.xx.xxxx / Weckmann
 *
 */

DialogLoggingOff
CreateBackground 'SwSetup - Hardcopy Installation'
			
vInstallDirVon = pwd	// Installation from the actual directory

vLogFileName   = '%__WindowsVerzeichnis__%\\Hardcopy.log'

fp = fopen vLogFileName 'w'							 
If __error__ == 0
	MessageBox 'Error open logfile: ''%vLogFileName%'''
	Exit
EndIf

fputs fp '\nInstallation Hardcopy\n\n'
fputs fp 'Datum/Uhrzeit: \t%__Date__%\n'
fputs fp '   WinVersion: \t%__WinVersion__%\n'
fputs fp '     WinMinor: \t%__WinMinor__%\n'
fputs fp '    WinSystem: \t%__WinSystem__%\n'
fputs fp '\n'


:NeuerVersuch
cd 'c:\\'
vDir = SelectDir 'c:\\Hardcopy' 'Please select a directory'
If __error__ == 0
	fputs fp 'Der Benutzer hat die Installation abgebrochen !\n'
	Exit
EndIf

mkdir vDir
If __error__ == 0
   MessageBox 'Unable to create the directory !'
   GoTo :NeuerVersuch
EndIf


if __WinSystem__ == 'NT'
   CopyFile '%vInstallDirVon%\\files\\HcpNTdll.dll' '%vDir%\\HcpNTdll.Dll' fp
   CopyFile '%vInstallDirVon%\\files\\HrdCpy32.exe' '%vDir%\\Hardcopy.exe' fp
else		// windows95 or windows 3.n
   CopyFile '%vInstallDirVon%\\files\\HcpDll.dll'   '%vDir%\\HcpDll.Dll'   fp
   CopyFile '%vInstallDirVon%\\files\\Hardcopy.exe' '%vDir%\\Hardcopy.exe' fp
endif
CopyFile      '%vInstallDirVon%\\files\\Readme.txt'   '%vDir%\\ReadMe.txt' fp
fputs fp '\n'

// ------------ Program-group
:NeuerVersuch2
vPrgGrp = SelectProgramGroup 'Hardcopy - Print Screen' 'Please select a Program Group'
If __error__ == 0
	fputs fp 'Installation - user abort !\n'
	Exit
EndIf

// ------------ Hardcopy
CreateItem '\\PG\\%vPrgGrp%' 'Hardcopy' '%vDir%\\Hardcopy.exe' '' '%vDir%' '%vDir%\\Hardcopy.exe' 0 1
If __error__ == 0
   MessageBox 'Error, can not create program-icon/group'
   GoTo :NeuerVersuch2
EndIf
fputs fp 'Ok: CreateItem "%vPrgGrp%" ---> Hardcopy\n'


// ------------ Readme
CreateItem '\\PG\\%vPrgGrp%' 'ReadMe' 'notepad' '%vDir%\\ReadMe.txt' '%vDir%' 'notepad.exe' 0 0

fputs fp '\nEnde\n'

MessageBox 'Setup is complete.  You may run the Hardcopy program.'

fclose fp
[ RETURN TO DIRECTORY ]