w10install/optional/install-purebasic.cmd

70 lines
1.7 KiB
Batchfile
Raw Normal View History

2021-01-29 11:42:19 +01:00
@echo off
2021-03-06 12:42:55 +01:00
set T=c:\TEMP
set TOOLS=c:\tools
2021-01-29 11:42:19 +01:00
2021-01-29 13:02:40 +01:00
set CONFIG=config\install-purebasic.txt
2021-03-13 23:32:05 +01:00
rem licensed version (exe contains key!)
rem access only for customers ...
set EXE=..\personal\purebasic-setup.exe
rem demo version (publically accessible)
2021-03-06 12:42:55 +01:00
set ZIP=..\software\purebasic.zip
2021-01-29 11:42:19 +01:00
2021-02-28 14:10:59 +01:00
echo killing PureBasic processes...
2021-01-29 19:09:28 +01:00
taskkill /F /IM PureBasic.exe 2>nul
taskkill /F /IM pbcompiler.exe 2>nul
2021-01-29 11:42:19 +01:00
2021-03-06 12:42:55 +01:00
if NOT EXIST %EXE% if NOT EXIST %ZIP% (
echo WARNING: no PureBasic zipfile or exe-installer found!
goto END
)
echo ####### %0 #######
if EXIST %EXE% (
2021-03-13 23:32:05 +01:00
echo INFO: %EXE% found, installing licensed version ...
2021-03-06 12:42:55 +01:00
rem remove old links ...
del /F /Q /A %PUBLIC%\Desktop\PureBasic*.lnk 2>nul
echo installing purebasic ...
2021-03-06 16:23:00 +01:00
start /wait %EXE% /LOADINF=%CONFIG% /NORESTART /NOCANCEL ^
/SILENT /SUPPRESSMSGBOXES /CLOSEAPPLICATIONS
2021-03-06 12:42:55 +01:00
goto LINK
)
if EXIST %ZIP% (
2021-03-13 23:32:05 +01:00
echo INFO: %ZIP% found, installing demo version ...
2021-03-06 12:42:55 +01:00
rem remove old links ...
del /F /Q /A %PUBLIC%\Desktop\PureBasic*.lnk 2>nul
%TOOLS%\7z e -y -aoa -o%T%\purebasic %ZIP%
move /Y %T%\purebasic\PureBasic*.exe %T%\purebasic\purebasic-setup.exe
echo installing purebasic ...
2021-03-06 16:23:00 +01:00
start /wait %T%\purebasic\purebasic-setup.exe ^
/LOADINF=%CONFIG% /NORESTART /NOCANCEL /SILENT /SUPPRESSMSGBOXES /CLOSEAPPLICATIONS
2021-03-06 12:42:55 +01:00
echo cleanup ...
rd /S /Q %T%\purebasic 2>nul
goto LINK
)
2021-01-29 11:42:19 +01:00
2021-03-06 12:42:55 +01:00
:LINK
2021-03-06 16:23:00 +01:00
rem remove personal link ...
del /F /Q /A %USERPROFILE%\Desktop\PureBasic*.lnk 2>nul
2021-03-06 12:42:55 +01:00
echo copy new PureBasic link to desktop ...
2021-02-28 14:10:59 +01:00
copy /Y "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\PureBasic\PureBasic (x64).lnk" ^
2021-03-06 12:42:55 +01:00
%PUBLIC%\Desktop\PureBasic.lnk
2021-02-28 14:10:59 +01:00
2021-03-06 16:23:00 +01:00
rem refresh desktop (W10 style)
ie4uinit.exe -show
2021-01-29 11:42:19 +01:00
echo ####### %0 #######
2021-03-06 12:42:55 +01:00
:END
2021-03-02 21:47:42 +01:00
pause
2021-01-29 11:42:19 +01:00