Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
November 01, 2014, 07:41:33 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: MyDefrag Ketarin Update Script (VerySilent)  (Read 3419 times)
fr@nkie
JkDefrag Senior
****
Posts: 28


View Profile
« on: November 01, 2009, 04:29:22 am »

Hi,

I have written a small script to automate my MyDefrag (all versions) updates. This script downloads latest MyDefrag from Filehippo.com and follows Jeroen Kessels recomendations regarding silent installs, uninstalls and also instructions to make MyDefrag portable available here and here. If you want to use it copy code below to notepad, save als UTF-8 and import to Ketarin (for best results use latest version 1.0.8.302 available here). I have tested script under 32-bit Windows XP SP2 and Windows Vista SP2 (with UAC off) without any problems. This script, like all other Ketarin scripts allows further customization.

Code:
<?xml version="1.0" encoding="utf-16"?>
<Jobs>
  <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <DownloadBeta>Avoid</DownloadBeta>
    <DownloadDate xsi:nil="true" />
    <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
    <VariableChangeIndicator />
    <CanBeShared>true</CanBeShared>
    <ShareApplication>false</ShareApplication>
    <ExclusiveDownload>false</ExclusiveDownload>
    <HttpReferer />
    <Variables />
    <ExecuteCommand>start "" /wait "{file}" /DIR="C:\Program Files\MyDefrag" /VERYSILENT &amp; md {root}USB-Toolkit\{appname}\ &amp; copy /y "C:\Program Files\MyDefrag\MyDefrag.exe" {root}USB-Toolkit\{appname}\ &amp; copy /y "C:\Program Files\MyDefrag\Example Scripts\*.MyD" {root}USB-Toolkit\{appname}\ &amp; copy /y "C:\Program Files\MyDefrag\Scripts\*.MyD" {root}USB-Toolkit\{appname}\</ExecuteCommand>
    <ExecutePreCommand>"C:\Program Files\MyDefrag\unins000.exe" /VERYSILENT</ExecutePreCommand>
    <Category>System</Category>
    <SourceType>FileHippo</SourceType>
    <PreviousLocation>C:\USB-Toolkit\System\MyDefrag-v4.2.4.exe</PreviousLocation>
    <DeletePreviousFile>true</DeletePreviousFile>
    <Enabled>true</Enabled>
    <FileHippoId>mydefrag</FileHippoId>
    <LastUpdated>2009-10-31T19:56:25.2340854-06:00</LastUpdated>
    <TargetPath>{root}USB-Toolkit\{category}\</TargetPath>
    <FixedDownloadUrl />
    <Name>MyDefragPortable</Name>
  </ApplicationJob>
</Jobs>
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7233



View Profile WWW
« Reply #1 on: November 01, 2009, 07:20:18 am »

Thanks for the contribution, I appreciate it. I see it does indeed follow all my recommendations, so I can happily endorse this Ketarin script. Please note that MyDefrag scripts are generally not upwards compatible, old scripts will not work on a new MyDefrag version and will generate a syntax error. So this automatic Ketarin script should only be used by people that use plain vanilla MyDefrag, straight out of the box without any modifications to .MyD files whatsoever.
Logged
fr@nkie
JkDefrag Senior
****
Posts: 28


View Profile
« Reply #2 on: November 01, 2009, 05:03:30 pm »

No problem. But i'm a bit confused Huh with portable version, when you say that if i run MyDefrag from a USB stick

Quote
Boot optimization does not work
http://www.mydefrag.com/FAQUsing-HowToUseMyDefragFromABootableCD-ROMOrMemoryStick.html

when MyDefrag is using relative adresses for boot optimization?
Quote
MyDefrag uses the "%SystemRoot%\Prefetch\Layout.ini" file for the boot optimization.


PS - if this was discussed before just point me the link as i couldnt find it. thanks.
« Last Edit: November 01, 2009, 05:05:37 pm by fr@nkie » Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7233



View Profile WWW
« Reply #3 on: November 01, 2009, 05:14:48 pm »

I'm not sure I understand your question, but take a look at the "c:\windows\prefetch\layout.ini" file on your disk (it's a text file, you can open with Notepad). When booted from cdrom MyDefrag will search for this file on the cdrom, not on your harddisk.
Logged
fr@nkie
JkDefrag Senior
****
Posts: 28


View Profile
« Reply #4 on: November 01, 2009, 05:41:21 pm »

Maybe i'm not understanding the english correctly, what i mean is:

- If i run MyDefrag from a non-bootable USB stick, will MyDefrag be able to do boot optimization for my OS located in C:\ (i understand this can be a problem in network drives)? I think so because you tell me MyDefrag is using %SystemRoot% variable ("%SystemRoot%\Prefetch\Layout.ini") for the boot optimization.

- But i can verify it if i open "c:\windows\prefetch\layout.ini"? What should i do?
« Last Edit: November 01, 2009, 05:43:54 pm by fr@nkie » Logged
Darlis
JkDefrag Hero
*****
Posts: 1773


View Profile WWW
« Reply #5 on: November 01, 2009, 05:56:57 pm »

No problem. But i'm a bit confused Huh with portable version, when you say that if i run MyDefrag from a USB stick

Quote
Boot optimization does not work
http://www.mydefrag.com/FAQUsing-HowToUseMyDefragFromABootableCD-ROMOrMemoryStick.html

If you quote a bit more you get
Quote
Boot optimization does not work
MyDefrag optimizes your disk(s) for the currently booted Windows, which in this case is the CD-ROM (or memory stick or whatever).
If you boot Windows from your disk, like always, you can run MyDefrag from USB and it will optimize everything like expected. But, if you boot from an USB-Stick (or CD-Rom), the %SystemRoot% variable does not point to the windows-folder on your disk anymore. This is where boot-optimization will not work.
Logged

Need help creating a script? Try MyDefrag Script Creator.
fr@nkie
JkDefrag Senior
****
Posts: 28


View Profile
« Reply #6 on: November 01, 2009, 06:29:16 pm »

OK i misread it, perfect.  Smiley
Logged
jonib
JkDefrag Hero
*****
Posts: 822


View Profile
« Reply #7 on: November 01, 2009, 07:52:39 pm »

You can use ImportListFromFile to boot optimize the non booted Windows, but only if the paths in the layout.ini is the same when booting from the USB. or you could use my tool that should work to fix the paths.

jonib
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!