Difference between revisions of "UltraDefrag"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(added hint about encoding of boot time command file)
Line 49: Line 49:
  
 
=== ud-boot-time.cmd ===
 
=== ud-boot-time.cmd ===
 +
 +
'''This file must be saved in UTF-16 Little Endian (=UNICODE) encoding.'''
 
<source lang="dos">
 
<source lang="dos">
 
;                UltraDefrag Boot Time Shell Script
 
;                UltraDefrag Boot Time Shell Script

Revision as of 18:15, 21 April 2009

Silent installer for UltraDefrag - An Open Source Defragmenter, a boot time disk defragmentation tool with console or GUI interface.
It uses the NSIS installer.

Micro Edition (Console Version)

Install

The install method installs either the 32-bit or 64-bit Windows version.
You need to use WPKG Client 1.3.6 or higher for 64-bit Windows !!!

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.
It enables the boot time defragmentation too.

Upgrade

The upgrade method does the same as the install method, since there is no difference.

Remove

The remove method deactivates the boot time defragmentation first.
Then it removes the package and any leftovers.

The Package

<package
	id="UltraDefrag"
	name="Ultra Defragmenter Micro Edition"
	revision="300"
	reboot="false"
	priority="10">

	<check type="uninstall" condition="exists" path="Ultra Defragmenter Micro Edition" />
	<check type="file" condition="versiongreaterorequal" path="%SystemRoot%\system32\udefrag.exe" value="3.0.0.0" />

	<install timeout="300" cmd='%ComSpec% /c if %PROCESSOR_ARCHITECTURE% == x86 "%SOFTWARE%\UltraDefrag\ultradefrag-micro-edition-3.0.0.bin.i386.exe" /S /NCRC' />
	<install timeout="300" cmd='%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 "%SystemRoot%\system32\bootexctrl.exe" /r defrag_native' />

	<upgrade timeout="300" cmd='%ComSpec% /c if %PROCESSOR_ARCHITECTURE% == x86 "%SOFTWARE%\UltraDefrag\ultradefrag-micro-edition-3.0.0.bin.i386.exe" /S /NCRC' />
	<upgrade timeout="300" cmd='%ComSpec% /c if %PROCESSOR_ARCHITECTURE% == AMD64 "%SOFTWARE%\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 timeout="15" cmd='%ComSpec% /C "%SystemRoot%\system32\bootexctrl.exe" /u defrag_native' />
	<remove timeout="300" cmd='%ComSpec% /c "%SystemRoot%\UltraDefrag\uninstall.exe" /S /NCRC' />
	<remove timeout="60" cmd='%ComSpec% /c if exist "%SystemRoot%\UltraDefrag" rmdir /s /q "%SystemRoot%\UltraDefrag"' />
	<remove timeout="60" cmd='%ComSpec% /c if exist "%SystemRoot%\system32\ud-boot-time.cmd" del /f /q "%SystemRoot%\system32\ud-boot-time.cmd"' />
	<remove timeout="60" cmd='%ComSpec% /c if exist "%SystemRoot%\system32\udefrag-gui.cmd" del /f /q "%SystemRoot%\system32\udefrag-gui.cmd"' />
</package>

ud-boot-time.cmd

This file must be saved in UTF-16 Little Endian (=UNICODE) encoding.

;                UltraDefrag Boot Time Shell Script
; !!! NOTE: THIS FILE MUST BE SAVED IN UNICODE (UTF-16) ENCODING !!!
;--------------------------------------------------------------------
udefrag c:
exit