Difference between revisions of "UltraDefrag"
From WPKG | Open Source Software Deployment and Distribution
(Added reference information for the version 5.x installer. Don't know if this also applies to v4.x, but I got side-tracked for about an hour trying to make the "del" and "reg" hacks work before I went looking for this info.) |
(updated to the latest version, removed information contained in the UltraDefrag handbook) |
||
Line 1: | Line 1: | ||
− | Silent installer for [http://ultradefrag.sourceforge.net/ UltraDefrag - An Open Source Defragmenter], a | + | Silent installer for [http://ultradefrag.sourceforge.net/ UltraDefrag - An Open Source Defragmenter], a disk defragmentation tool with boot time, console and GUI interface. |
− | + | ||
− | + | It uses the NSIS installer, see the [http://ultradefrag.sourceforge.net/handbook/Installation.html UltraDefrag handbook] for a list of supported installer command line switches. | |
− | |||
− | |||
− | |||
− | + | == Micro Edition (Console Version) == | |
− | + | ||
− | + | This installs the appropriate version based on the Windows architecture. | |
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
<source lang="xml"> | <source lang="xml"> | ||
− | <package | + | <package id="UltraDefrag" name="Ultra Defragmenter" revision="%PKG_VERSION%" reboot="false" priority="10"> |
− | + | <variable name="PKG_VERSION" value="5.1.0" /> | |
− | + | <variable name="PKG_ARCHITECTURE" value="%PROCESSOR_ARCHITECTURE%"/> | |
− | + | <variable name="PKG_ARCHITECTURE" value="i386" architecture="x86"/> | |
− | + | <variable name="PKG_SOURCE" value="%SOFTWARE%\UltraDefrag\ultradefrag-%PKG_VERSION%.bin.%PKG_ARCHITECTURE%.exe"/> | |
− | + | <variable name="PKG_DESTINATION" value="%ProgramFiles%\UltraDefrag"/> | |
+ | <variable name="PKG_REMOVE_SWITCH" value="/S _?=%PKG_DESTINATION%"/> | ||
− | + | <!-- install the micro edition --> | |
− | + | <variable name="PKG_INSTALL_SWITCH" value='/S /MICRO=1' /> | |
− | + | <check type="uninstall" condition="versiongreaterorequal" path="Ultra Defragmenter" value="%PKG_VERSION%" /> | |
− | + | ||
− | + | ||
− | + | ||
− | + | <install cmd='"%PKG_SOURCE%" %PKG_INSTALL_SWITCH% /D=%PKG_DESTINATION%' /> | |
− | + | ||
− | + | ||
− | + | ||
− | + | <upgrade include="install" /> | |
− | + | <downgrade include="install" /> | |
− | + | ||
− | + | <remove cmd='"%PKG_DESTINATION%\uninstall.exe" %PKG_REMOVE_SWITCH%' /> | |
− | + | <remove cmd='%ComSpec% /C if exist "%PKG_DESTINATION%\uninstall.exe" del /f /q "%PKG_DESTINATION%\uninstall.exe"' /> | |
+ | <remove cmd='%ComSpec% /C if exist "%PKG_DESTINATION%" rmdir /q /s "%PKG_DESTINATION%"' /> | ||
</package> | </package> | ||
</source> | </source> | ||
− | |||
− | + | == Standard Edition (Gui Version) == | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
+ | Set the default language with the /LANG installer command line switch depending on the system language. | ||
+ | <source lang="xml"> | ||
+ | <package id="UltraDefrag" name="Ultra Defragmenter" revision="%PKG_VERSION%" reboot="false" priority="10"> | ||
− | == | + | <variable name="PKG_VERSION" value="5.1.0" /> |
+ | <variable name="PKG_ARCHITECTURE" value="%PROCESSOR_ARCHITECTURE%"/> | ||
+ | <variable name="PKG_ARCHITECTURE" value="i386" architecture="x86"/> | ||
+ | <variable name="PKG_SOURCE" value="%SOFTWARE%\UltraDefrag\ultradefrag-%PKG_VERSION%.bin.%PKG_ARCHITECTURE%.exe"/> | ||
+ | <variable name="PKG_DESTINATION" value="%ProgramFiles%\UltraDefrag"/> | ||
+ | <variable name="PKG_REMOVE_SWITCH" value="/S _?=%PKG_DESTINATION%"/> | ||
− | + | <!-- default language is English --> | |
+ | <variable name="PKG_LANG" value="English (US)"/> | ||
− | + | <!-- overwrite default language for German systems --> | |
− | + | <variable name="PKG_LANG" value="German" lcidOS="407,c07,1407,1007,807"/> | |
− | + | ||
− | + | ||
− | + | <!-- install everything --> | |
− | < | + | <variable name="PKG_INSTALL_SWITCH" value='/S /LANG="%PKG_LANG%" /FULL=1' /> |
− | < | + | |
− | < | + | <!-- install only start menu icon for Windows 7 and above --> |
− | + | <variable name="PKG_INSTALL_SWITCH" value='%PKG_INSTALL_SWITCH% /ICONS=0 /STARTMENUICON=1' os="6\.[1-9]\.\d{4}"/> | |
− | + | ||
− | + | ||
− | + | <check type="uninstall" condition="versiongreaterorequal" path="Ultra Defragmenter" value="%PKG_VERSION%" /> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | <install cmd='"%PKG_SOURCE%" %PKG_INSTALL_SWITCH% /D=%PKG_DESTINATION%' /> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | <upgrade include="install" /> | |
− | + | <downgrade include="install" /> | |
− | + | ||
− | + | <remove cmd='"%PKG_DESTINATION%\uninstall.exe" %PKG_REMOVE_SWITCH%' /> | |
− | + | <remove cmd='%ComSpec% /C if exist "%PKG_DESTINATION%\uninstall.exe" del /f /q "%PKG_DESTINATION%\uninstall.exe"' /> | |
− | + | <remove cmd='%ComSpec% /C if exist "%PKG_DESTINATION%" rmdir /q /s "%PKG_DESTINATION%"' /> | |
+ | </package> | ||
</source> | </source> | ||
− | |||
− | |||
− | + | == Enable boot time processing after WPKG changed something == | |
− | + | It is not recommended to defragment a disk very often, since this will heavily reduce the lifetime of the disk. | |
− | + | ||
− | + | <source lang="xml"> | |
− | + | <package id="UltraDefragEnable" name="Ultra Defragmenter Enable Boot Scan" revision="2010.02.19" reboot="false" execute="changed"> | |
− | + | <depends package-id="UltraDefrag"/> | |
− | + | ||
− | + | ||
− | </ | + | |
− | = | + | <install cmd='%ComSpec% /C "%SystemRoot%\system32\bootexctrl.exe" /r defrag_native' /> |
− | + | <remove cmd='%ComSpec% /C if exist "%SystemRoot%\system32\bootexctrl.exe" "%SystemRoot%\system32\bootexctrl.exe" /u defrag_native' /> | |
+ | </package> | ||
+ | <source> | ||
− | |||
− | |||
− | |||
[[Category:Silent Installers]] | [[Category:Silent Installers]] | ||
+ | [[Category:NSIS]] |
Revision as of 13:54, 10 November 2012
Silent installer for UltraDefrag - An Open Source Defragmenter, a disk defragmentation tool with boot time, console and GUI interface.
It uses the NSIS installer, see the UltraDefrag handbook for a list of supported installer command line switches.
Micro Edition (Console Version)
This installs the appropriate version based on the Windows architecture.
<package id="UltraDefrag" name="Ultra Defragmenter" revision="%PKG_VERSION%" reboot="false" priority="10">
<variable name="PKG_VERSION" value="5.1.0" />
<variable name="PKG_ARCHITECTURE" value="%PROCESSOR_ARCHITECTURE%"/>
<variable name="PKG_ARCHITECTURE" value="i386" architecture="x86"/>
<variable name="PKG_SOURCE" value="%SOFTWARE%\UltraDefrag\ultradefrag-%PKG_VERSION%.bin.%PKG_ARCHITECTURE%.exe"/>
<variable name="PKG_DESTINATION" value="%ProgramFiles%\UltraDefrag"/>
<variable name="PKG_REMOVE_SWITCH" value="/S _?=%PKG_DESTINATION%"/>
<!-- install the micro edition -->
<variable name="PKG_INSTALL_SWITCH" value='/S /MICRO=1' />
<check type="uninstall" condition="versiongreaterorequal" path="Ultra Defragmenter" value="%PKG_VERSION%" />
<install cmd='"%PKG_SOURCE%" %PKG_INSTALL_SWITCH% /D=%PKG_DESTINATION%' />
<upgrade include="install" />
<downgrade include="install" />
<remove cmd='"%PKG_DESTINATION%\uninstall.exe" %PKG_REMOVE_SWITCH%' />
<remove cmd='%ComSpec% /C if exist "%PKG_DESTINATION%\uninstall.exe" del /f /q "%PKG_DESTINATION%\uninstall.exe"' />
<remove cmd='%ComSpec% /C if exist "%PKG_DESTINATION%" rmdir /q /s "%PKG_DESTINATION%"' />
</package>
Standard Edition (Gui Version)
Set the default language with the /LANG installer command line switch depending on the system language.
<package id="UltraDefrag" name="Ultra Defragmenter" revision="%PKG_VERSION%" reboot="false" priority="10">
<variable name="PKG_VERSION" value="5.1.0" />
<variable name="PKG_ARCHITECTURE" value="%PROCESSOR_ARCHITECTURE%"/>
<variable name="PKG_ARCHITECTURE" value="i386" architecture="x86"/>
<variable name="PKG_SOURCE" value="%SOFTWARE%\UltraDefrag\ultradefrag-%PKG_VERSION%.bin.%PKG_ARCHITECTURE%.exe"/>
<variable name="PKG_DESTINATION" value="%ProgramFiles%\UltraDefrag"/>
<variable name="PKG_REMOVE_SWITCH" value="/S _?=%PKG_DESTINATION%"/>
<!-- default language is English -->
<variable name="PKG_LANG" value="English (US)"/>
<!-- overwrite default language for German systems -->
<variable name="PKG_LANG" value="German" lcidOS="407,c07,1407,1007,807"/>
<!-- install everything -->
<variable name="PKG_INSTALL_SWITCH" value='/S /LANG="%PKG_LANG%" /FULL=1' />
<!-- install only start menu icon for Windows 7 and above -->
<variable name="PKG_INSTALL_SWITCH" value='%PKG_INSTALL_SWITCH% /ICONS=0 /STARTMENUICON=1' os="6\.[1-9]\.\d{4}"/>
<check type="uninstall" condition="versiongreaterorequal" path="Ultra Defragmenter" value="%PKG_VERSION%" />
<install cmd='"%PKG_SOURCE%" %PKG_INSTALL_SWITCH% /D=%PKG_DESTINATION%' />
<upgrade include="install" />
<downgrade include="install" />
<remove cmd='"%PKG_DESTINATION%\uninstall.exe" %PKG_REMOVE_SWITCH%' />
<remove cmd='%ComSpec% /C if exist "%PKG_DESTINATION%\uninstall.exe" del /f /q "%PKG_DESTINATION%\uninstall.exe"' />
<remove cmd='%ComSpec% /C if exist "%PKG_DESTINATION%" rmdir /q /s "%PKG_DESTINATION%"' />
</package>
Enable boot time processing after WPKG changed something
It is not recommended to defragment a disk very often, since this will heavily reduce the lifetime of the disk.
<package id="UltraDefragEnable" name="Ultra Defragmenter Enable Boot Scan" revision="2010.02.19" reboot="false" execute="changed">
<depends package-id="UltraDefrag"/>
<install cmd='%ComSpec% /C "%SystemRoot%\system32\bootexctrl.exe" /r defrag_native' />
<remove cmd='%ComSpec% /C if exist "%SystemRoot%\system32\bootexctrl.exe" "%SystemRoot%\system32\bootexctrl.exe" /u defrag_native' />
</package>
<source>
[[Category:Silent Installers]]
[[Category:NSIS]]