Changes

UltraDefrag

3,367 bytes added, 16:16, 7 March 2011
Add a script for gui install
exit
</source>
 
 
 
== Standard Edition (Gui Version) ==
 
This is derived from the micro-edition install script (see above). the main diferences are :
 
* Check for UltraDefrag version thanks to 'versiongreaterorequal' check
* Set the default language with the /LANG install Flag (set in french in this example)
* 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, they are dependents of the system language. Change the script accordingly to your system.
* Set Ultradefrag as the windows defragmenter
 
=== The Package ===
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
 
<packages>
<package id="ultradefrag" name="UltraDefrag" revision="1" reboot="false" priority="10">
<variable name="PKG_VERSION" value="4.4.0" />
<check type="uninstall" condition="versiongreaterorequal" path="Ultra Defragmenter" value="%PKG_VERSION%" />
 
<install cmd='"%SOFTWARE%\ultradefrag\UltraDefrag_%PKG_VERSION%.bin.i386.exe" /S /LANG="French (FR)"' />
<!-- Delete shortcuts -->
<install cmd='%COMSPEC% /C del /Q "%AllUsersProfile%\Bureau\UltraDefrag.lnk"' />
<install cmd='%COMSPEC% /C rmdir /Q /S "%AllUsersProfile%\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 cmd='"%SOFTWARE%\ultradefrag\ultradefrag-%PKG_VERSION%.bin.i386.exe" /S /LANG=FR' />
<!-- Delete shortcuts -->
<upgrade cmd='%COMSPEC% /C del /Q "%AllUsersProfile%\Bureau\UltraDefrag.lnk"' />
<upgrade cmd='%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 %SOFTWARE%\ultradefrag\ultradefrag.reg' />
 
<remove cmd='"%SystemRoot%\system32\bootexctrl.exe" /u defrag_native' />
<remove cmd='"%SystemRoot%\UltraDefrag\uninstall.exe" /S' />
<!-- Restore the Windows default defragmenter -->
<remove cmd='rundll32.exe advpack.dll,LaunchINFSectionEx %SystemRoot%\inf\dfrg.inf,,,4' />
</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)
 
<source lang='text'>
Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\DefragPath]
@=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
</source>
 
[[Category:Silent Installers]]
266
edits