Difference between revisions of "UltraDefrag"
m (→Standard Edition (Gui Version)) |
(added info about making UD the default defragmenter) |
||
Line 72: | Line 72: | ||
</package> | </package> | ||
</source> | </source> | ||
+ | |||
+ | |||
+ | ==== Make UltraDefrag the default defragmenter ==== | ||
+ | |||
+ | '''This is only valid if you have installed the GUI interface.''' | ||
+ | |||
+ | |||
+ | Place this as the last install command: | ||
+ | <source lang="xml"> | ||
+ | <install cmd='reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\DefragPath" /ve /t REG_EXPAND_SZ /d "%PKG_DESTINATION%\ultradefrag.exe" /f' /> | ||
+ | </source> | ||
+ | |||
+ | |||
+ | Place this as the first remove command: | ||
+ | <source lang="xml"> | ||
+ | <remove cmd='rundll32.exe advpack.dll,LaunchINFSectionEx "%SystemRoot%\inf\dfrg.inf",,,4' /> | ||
+ | </source> | ||
+ | |||
== Enable boot time processing after WPKG changed something == | == Enable boot time processing after WPKG changed something == |
Revision as of 11:00, 11 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.
Contents
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>
Make UltraDefrag the default defragmenter
This is only valid if you have installed the GUI interface.
Place this as the last install command:
<install cmd='reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\DefragPath" /ve /t REG_EXPAND_SZ /d "%PKG_DESTINATION%\ultradefrag.exe" /f' />
Place this as the first remove command:
<remove cmd='rundll32.exe advpack.dll,LaunchINFSectionEx "%SystemRoot%\inf\dfrg.inf",,,4' />
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>
It is recommended to use a boot time script that turns off boot time processing when finished.
@echo off
;--------------------------------------------------------------------
; UltraDefrag Boot Time Shell Script
;--------------------------------------------------------------------
; !!! NOTE: THIS FILE MUST BE SAVED IN UNICODE (UTF-16) ENCODING !!!
;--------------------------------------------------------------------
; set processing time limit to one hour
set UD_TIME_LIMIT=1h
; quick optimize the system drive
udefrag %SystemDrive% -q
; disable boot time scan
boot-off
; terminate the execution
exit