Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 21, 2013, 02:57:08 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Read Layout.ini as relative paths  (Read 777 times)
Thaliur
JkDefrag Hero
*****
Posts: 71


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

HI Jeroen,
I think this will be a pretty easy addition/change:

When MyDefrag analyses the Boot Optimisation file, I guess it would be a good idea to make the function use relative paths, for finding the Layout.ini as well as for selecting the files.
I don't know how the relative path to Layout.ini might work, but I think it's not more than one line of code that has to be changed, and when reading the file, the "C:\" part of each line would just need to be read as "?:\" and passed on to the file selector.

The benefit would be:
Users can connect system disks to computers they don't belong to, so none of the files on the disk would be in use during defragmentation, only some of the NTFS files maybe, and everything could be arranged as desired.
Of course, this would also work with a VHD of the local system which can then be restored to an optimised state.

But if there is a way to do this using scripts, I'd be more than happy
Logged
jonib
JkDefrag Hero
*****
Posts: 810


View Profile
« Reply #1 on: November 04, 2009, 09:58:19 am »

But if there is a way to do this using scripts, I'd be more than happy
I have made a small tool that can use the layout.ini from a non-booted Windows AltLayout.

jonib
Logged

jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #2 on: November 04, 2009, 10:04:59 am »

I think this will be a pretty easy addition/change:
Thanks for sharing your idea, I appreciate it. The Layout.ini file will usually contain only paths to files on the system disk, but it is entirely possible (I have seen it) that there are paths to other disks. It incorrect to assume that all the paths in the layout.ini file point to files on the disk where the layout.ini was found. Another problem is that a disk can have more than one layout.ini file, from multiboot installations.

Quote
But if there is a way to do this using scripts, I'd be more than happy
See the ImportListFromFile fileboolean. It can import a layout.ini file from anywhere you want. It cannot replace driveletters, you would have to do that outside MyDefrag, for example with Jonib's tool.
Logged
Thaliur
JkDefrag Hero
*****
Posts: 71


View Profile
« Reply #3 on: November 04, 2009, 03:11:14 pm »

I think this will be a pretty easy addition/change:
Thanks for sharing your idea, I appreciate it. The Layout.ini file will usually contain only paths to files on the system disk, but it is entirely possible (I have seen it) that there are paths to other disks. It incorrect to assume that all the paths in the layout.ini file point to files on the disk where the layout.ini was found. Another problem is that a disk can have more than one layout.ini file, from multiboot installations.

Quote
But if there is a way to do this using scripts, I'd be more than happy
See the ImportListFromFile fileboolean. It can import a layout.ini file from anywhere you want. It cannot replace driveletters, you would have to do that outside MyDefrag, for example with Jonib's tool.
That's what I've done so far. It's not a bad way to do it, I just hoped there might be a more elegant, automated solution.
Thank you anyway, Jeroen and Jonib Smiley
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!