Changes

Jump to: navigation, search

UltraDefrag

2,905 bytes removed, 13:54, 10 November 2012
updated to the latest version, removed information contained in the UltraDefrag handbook
Silent installer for [http://ultradefrag.sourceforge.net/ UltraDefrag - An Open Source Defragmenter], a boot time disk defragmentation tool with boot time, console or and GUI interface. <br>It uses the NSIS installer.
== Micro Edition (Console Version) ==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.
=== Install ===
The install method installs either the 32-bit or 64-bit Windows version. <br>
'''You need to use WPKG Client 1.3.6 or higher for 64-bit Windows !!!''' <br>
It copies a predefined boot time command file too, but you can skip this, if you like to use the default file, shipping with UltraDefrag. <br>It enables the boot time defragmentation too.== Micro Edition (Console Version) ==
=== Upgrade ===The upgrade method does This installs the same as appropriate version based on the install method, since there is no differenceWindows architecture.
=== Remove ===
The remove method deactivates the boot time defragmentation first. <br>
Then it removes the package and any leftovers.
 
=== The Package ===
<source lang="xml">
<package id="UltraDefrag" name="Ultra Defragmenter Micro Edition" revision="300%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%"/>
<check type="uninstall" condition="exists" path="Ultra Defragmenter Micro Edition" /!-- install the micro edition --> <check typevariable name="filePKG_INSTALL_SWITCH" conditionvalue="versiongreaterorequal" path'/S /MICRO="%SystemRoot%\system32\udefrag.exe" value="3.0.0.0" 1' />
<install timeoutcheck type="300uninstall" cmdcondition='%ComSpec% /c if %PROCESSOR_ARCHITECTURE% == x86 "%SOFTWARE%\UltraDefrag\ultradefrag-micro-edition-3.0.0.bin.i386.exeversiongreaterorequal" /S /NCRC' /> <install timeoutpath="300Ultra Defragmenter" cmdvalue='%ComSpec% /c if %PROCESSOR_ARCHITECTURE% == AMD64 "%SOFTWARE%\UltraDefrag\ultradefrag-micro-edition-3.0.0.bin.amd64.exe" /S /NCRC' /> <install timeout="15" cmd='%ComSpec% /C copy /b /v /y "%SOFTWARE%\UltraDefrag\ud-boot-time.cmd" "%SystemRoot%\system32"' /> <install timeout="15" cmd='%ComSpec% /C "%SystemRootPKG_VERSION%\system32\bootexctrl.exe" /r defrag_native' />
<upgrade timeout="300" install cmd='%ComSpec% /c if %PROCESSOR_ARCHITECTURE% == x86 "%SOFTWAREPKG_SOURCE%\UltraDefrag\ultradefrag-micro-edition-3.0.0.bin.i386.exe" /S /NCRC' /> <upgrade timeout="300" cmd='%ComSpecPKG_INSTALL_SWITCH% /c if %PROCESSOR_ARCHITECTURE% D== AMD64 "%SOFTWAREPKG_DESTINATION%\UltraDefrag\ultradefrag-micro-edition-3.0.0.bin.amd64.exe" /S /NCRC' /> <upgrade timeout="15" cmd='%ComSpec% /C copy /b /v /y "%SOFTWARE%\UltraDefrag\ud-boot-time.cmd" "%SystemRoot%\system32"' /> <upgrade timeout="15" cmd='%ComSpec% /C "%SystemRoot%\system32\bootexctrl.exe" /r defrag_native' />
<remove timeoutupgrade include="15install" cmd='%ComSpec% /C "%SystemRoot%\system32\bootexctrl.exe" /u defrag_native' /> <remove timeoutdowngrade include="300install" cmd='%ComSpec% /c "%WinDir%\UltraDefrag\uninstall.exe" /S /NCRC' /> <remove timeout="60" cmd='%ComSpec% /c if exist "%WinDirPKG_DESTINATION%\UltraDefrag" rmdir /s /q uninstall.exe"%WinDirPKG_REMOVE_SWITCH%\UltraDefrag"' /> <remove timeout="60" cmd='%ComSpec% /c C if exist "%SystemRootPKG_DESTINATION%\system32\ud-boot-timeuninstall.cmdexe" del /f /q "%SystemRootPKG_DESTINATION%\system32\ud-boot-timeuninstall.cmdexe"' /> <remove timeout="60" cmd='%ComSpec% /c C if exist "%SystemRootPKG_DESTINATION%\system32\udefrag-gui.cmd" del rmdir /f q /q s "%SystemRootPKG_DESTINATION%\system32\udefrag-gui.cmd"' />
</package>
</source>
=== ud-boot-time.cmd ===
'''This file must be saved in UTF-16 Little Endian (=UNICODE) encoding''', or you alter the file shipping with the installation. <br>Put this file into the '''%SystemRoot%\system32''' folder.<source lang="dos">; UltraDefrag Boot Time Shell Script; !!! NOTE: THIS FILE MUST BE SAVED IN UNICODE Standard Edition (UTF-16Gui Version) ENCODING !!!;--------------------------------------------------------------------udefrag c:exit</source>==
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= Standard Edition (Gui Version) "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%"/>
This <!-- default language is derived from the microEnglish --edition install script > <variable name="PKG_LANG" value="English (see aboveUS). the main differences are :"/>
* Check for UltraDefrag version thanks to 'versiongreaterorequal' check* Set the <!-- overwrite default language with the /LANG install Flag (set in french in this example)for German systems -->* Remove shortcuts and context menu entries for UltraDefrag because unfortunatly there is no options for this in the GUI silent installer. In the case of the shortcuts <variable name="PKG_LANG" value="German" lcidOS="407, they are dependents of the system language. Change the script accordingly to your system.* Set Ultradefrag as the windows defragmenterc07,1407,1007,807"/>
=== The Package === <source lang="xml"!-- install everything --> <?xml versionvariable name="1.0PKG_INSTALL_SWITCH" encodingvalue='/S /LANG="UTF-8%PKG_LANG%"?/FULL=1' />
<packages!-- install only start menu icon for Windows 7 and above --> <package id="ultradefrag" name="UltraDefrag" revision="1" reboot="false" priority="10"> <variable name="PKG_VERSIONPKG_INSTALL_SWITCH" value="4.4.'%PKG_INSTALL_SWITCH% /ICONS=0" /> <check typeSTARTMENUICON="uninstall" condition1' os="versiongreaterorequal" path="Ultra Defragmenter" value="%PKG_VERSION%6\.[1-9]\.\d{4}" />
<install cmdcheck type='"%SOFTWARE%\ultradefrag\UltraDefrag_%PKG_VERSION%.bin.i386.exeuninstall" /S /LANGcondition="French (FR)versiongreaterorequal"' /> <!-- Delete shortcuts --> <install cmdpath='%COMSPEC% /C del /Q "%AllUsersProfile%\Bureau\UltraDefrag.lnkUltra Defragmenter"' /> <install cmdvalue='%COMSPEC% /C rmdir /Q /S "%AllUsersProfilePKG_VERSION%\Menu Démarrer\Programmes\UltraDefrag"' /> <!-- Delete ContextMenu entries --> <install cmd='reg delete "HKCR\*\shell\udefrag" /f' /> <install cmd='reg delete "HKCR\Drive\shell\udefrag" /f' /> <install cmd='reg delete "HKCR\Folder\shell\udefrag" /f' /> <!-- Replace the Windows default defragmenter --> <install cmd='regedit /S %SOFTWARE%\ultradefrag\ultradefrag.reg' />
<upgrade install cmd='"%SOFTWAREPKG_SOURCE%\ultradefrag\ultradefrag-%PKG_VERSION%.bin.i386.exe" /S /LANG=FR' /> <!-- Delete shortcuts --> <upgrade cmd='%COMSPECPKG_INSTALL_SWITCH% /C del /Q "%AllUsersProfile%\Bureau\UltraDefrag.lnk"' /> <upgrade cmdD='%COMSPEC% /C rmdir /Q /S "%AllUsersProfile%\Menu Démarrer\Programmes\UltraDefrag"' /> <!-- Delete ContextMenu entries --> <upgrade cmd='reg delete "HKCR\*\shell\udefrag" /f' /> <upgrade cmd='reg delete "HKCR\Drive\shell\udefrag" /f' /> <upgrade cmd='reg delete "HKCR\Folder\shell\udefrag" /f' /> <!-- Replace the Windows default defragmenter --> <upgrade cmd='regedit /S %SOFTWAREPKG_DESTINATION%\ultradefrag\ultradefrag.reg' />
<upgrade include="install" /> <downgrade include="install" />  <remove cmd='"%SystemRootPKG_DESTINATION%\system32\bootexctrluninstall.exe" /u defrag_native%PKG_REMOVE_SWITCH%' /> <remove cmd='%ComSpec% /C if exist "%WinDirPKG_DESTINATION%\UltraDefrag\uninstall.exe" del /Sf /q "%PKG_DESTINATION%\uninstall.exe"' /> <!-- Restore the Windows default defragmenter --> <remove cmd='rundll32.exe advpack.dll,LaunchINFSectionEx %SystemRootComSpec%\inf\dfrg.inf,,,4/C if exist "%PKG_DESTINATION%" rmdir /q /s "%PKG_DESTINATION%"' /> </package></packages>
</source>
=== ultradefrag.reg ===
This change the default Windows defragmenter to '%systemroot%\UltraDefrag\ultradefrag.exe'
This can be reverted by reinstalling %SystemRoot%\inf\dfrg.inf (see the remove entry)== Enable boot time processing after WPKG changed something ==
<source lang='text'>Windows Registry Editor Version 5It is not recommended to defragment a disk very often, since this will heavily reduce the lifetime of the disk.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\DefragPath]<source lang="xml">@<package id=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,00,25,\ 00,5c,00,55,00,6c,00,74,00,72,00,61,00,44,00,65,00,66,00,72,00,61,00,67,00,\ 5c,00,75,00,6c,00,74,00,72,00,61,00,64,00,65,00,66,00,72,00,61,00,67,00,2e,\ 00,65,00,78,00,65,00,00,00"UltraDefragEnable" name="Ultra Defragmenter Enable Boot Scan" revision="2010.02.19" reboot="false" execute="changed"> <depends package-id="UltraDefrag"/source>
<install cmd== Notes on version 5.x installer ==ref: [http:/'%ComSpec% /ultradefragC "%SystemRoot%\system32\bootexctrl.sourceforge.netexe" /handbookr defrag_native' /Installation.html http:> <remove cmd='%ComSpec% //ultradefragC if exist "%SystemRoot%\system32\bootexctrl.sourceforgeexe" "%SystemRoot%\system32\bootexctrl.netexe" /handbooku defrag_native' /Installation.html]></package><source>
The 5.x has one installer that can manage the various aspects of UltraDefrag without resorting to "del" and "reg" commands.
* See the '''/ICONS=(0|1)''' and '''/SHELLEXTENSION=(0|1)'''.
* Also see the '''/MICRO=1''' switch to get the '''Micro''' edition.
[[Category:Silent Installers]]
[[Category:NSIS]]
0
edits

Navigation menu