executor/My Installations/common_scripts/common_generated.rul

59 lines
1.3 KiB
Plaintext
Executable File

function common_ProcessBeforeDataMove()
STRING svLogFile;
NUMBER nResult;
begin
InstallationInfo( @COMPANY_NAME, @PRODUCT_NAME, @PRODUCT_VERSION, @PRODUCT_KEY );
svLogFile = UNINST_LOGFILE_NAME;
nResult = DeinstallStart( svDir, svLogFile, @UNINST_KEY, 0 );
if (nResult < 0) then
MessageBox( @ERROR_UNINSTSETUP, WARNING );
endif;
szAppPath = TARGETDIR ^ APP_SUBDIR;
if ((bIs32BitSetup) && (bIsShellExplorer)) then
RegDBSetItem( REGDB_APPPATH, szAppPath );
RegDBSetItem( REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY );
RegDBSetItem( REGDB_UNINSTALL_NAME, @UNINST_DISPLAY_NAME );
endif;
end;
function common_MoveFileData()
NUMBER nResult, nDisk;
begin
nDisk = 1;
SetStatusWindow( 0, "" );
Disable( DIALOGCACHE );
Enable( STATUS );
StatusUpdate( ON, 100 );
nResult = ComponentMoveData( MEDIA, nDisk, 0 );
HandleMoveDataError( nResult );
Disable( STATUS );
return nResult;
end;
function common_HandleMoveDataError( nResult )
begin
switch (nResult)
case 0:
return 0;
default:
SprintfBox( SEVERE, @TITLE_CAPTIONBAR, @ERROR_MOVEDATA, nResult );
bInstallAborted = TRUE;
return nResult;
endswitch;
end;