MSFN Forum: Defraging sysoc.inf in your SOURCESS - MSFN Forum

Jump to content


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Defraging sysoc.inf in your SOURCESS via HFSLIP_POST.CMD Feature Rate Topic: -----

#1 User is offline   Geej 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 634
  • Joined: 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag

Posted 07 February 2010 - 02:05 AM

I made this autoit utility (DefragSysoc.exe) to defrag sysoc.inf (In SOURCESS\I386\SYSOC.IN_) after HFSLIP has added new entries to the end of sysoc.inf.

The purpose is to prevent potential bugs/error message to appear when application uses uninstall section of the inf and update the entries in sysoc.inf.
When 2 applications are uninstalled via it's inf, the whole portion of [Components] section added by HFSLIP is wipe out. (I think XP does not know how to process more than 1 [Components] section.) The error message appears when you click on "Add/Removes Windows Components" in Add/Remove Programs.
To prevent this, the [Components] section need to defrag. I think nlite & RMVi called it optimizing sysoc.inf. I called it defrag sysoc.inf since everyone understood what 'defrag' generally means :)

- Put DefragSysoc.exe in HFTOOLS (will only work from this location)
- Create HFSLIP_POST_DefragSysoc.cmd in HFTOOLS, with code or DL the simple cmd attachment
"%~dp0DefragSysoc.exe"

Attached File  HFSLIP_POST_DefragSysoc.cmd (148bytes)
Number of downloads: 30

DefragSysoc.exe now match mulitple [Components] section's items using regular expression:
$sCmpList=StringRegExp (FileRead ($FHopen),'(.*=[^\d].*,\s?\d)',3)
*Pls feedback if the regular expression match or miss some strings that is not part of [Components] items.

A backup copy is created in SOURCESS\I386\SYSYOCBAK.IN_ just in case.
This is the exact copy that HFSLIP created. (When expand, it's filename is SYSOC.INF, and not SYSOCBAK.INF)

DefragSysoc.exe includes some error handling situation. In such event, no changes will be made to your SYSOC.IN_
Error message will pop up, required user to acknowledge the problem found and script will exit.
DefragSysoc.exe will run silently/unattended if no problems are found and can defrag successfully.

A defraged sysoc.in_ file size should be smaller than SYSOCBAK.IN_


====Edit3:Add: /nobackup switch if you wish SYSOCBAK.IN_ to be deleted.
Change HFSLIP_POST_DefragSysoc.cmd to
"%~dp0DefragSysoc.exe" /nobackup
Add defrag runtime when use with /nobackup via DefragSysoc.log (loc in HFTOOLS)(DefragSysoc.exe generally runs under < 1 sec)

Pls test in virtual machine to verify.
I tested in XP Pro with hfslip-1.7.10_beta_J.
Hope this is useful... :)

DefragSysoc.exe
Posted Image
Size: 356.97 Kb (365,541 bytes)
MD5: DF26D700B1882EEFB6C1840745F8303E

Posted Image

This post has been edited by Geej: 30 April 2010 - 12:32 AM



#2 User is offline   Lilla 

  • Junior
  • Pip
  • Group: Members
  • Posts: 68
  • Joined: 11-May 05

Posted 19 February 2010 - 02:58 PM

Environment:
Base is Windows XP Pro Gold (aka Service Pack 0).
Integrating SP3, IE8, WMP11, RDC7, and most other updates.
Did not use HFCleanup or nLite.

Having experienced the problem described in your article, I decided to try using DefragSysoc.
However, apparently it did not run as after running HFSLIP the backup file created by DefragSysoc (SOURCESS\I386\SYSOCBAK.IN_) does not exist.

I created HFSLIP_POST_DefragSysoc.cmd (contains only the line below)
"%~dp0DefragSysoc.exe"
I left the double-quotes in place as shown in the example in the article linked to below, please advise if they should be removed.

I placed DefragSysoc.exe and the above .cmd file in the HFTOOLS folder
Then I ran hfslip-1.7.10_beta_G.cmd.

Should this utility work with this beta?

Your article says that DefragSysoc.exe does some error checking. Perhaps it doesn't like something. I followed your instructions. In case it might be helpful, I've attached some files for you to look at.

Any clues you might offer would be appreciated.

Thank you, Lilla

Attached File(s)

  • Attached File  Sysoc.zip (4.77K)
    Number of downloads: 17

This post has been edited by Lilla: 19 February 2010 - 03:00 PM


#3 User is offline   Geej 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 634
  • Joined: 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag

Posted 19 February 2010 - 07:25 PM

The backup file created by DefragSysoc (SOURCESS\I386\SYSOCBAK.IN_) does not exist because in SOURCE\i386 folder, sysoc.in_ is still having 2 [Components] sections.
(SYSOC_2source_after.inf)


You should only have 1 edited sysoc.in_ in your SOURCE\i386 folder.
(SYSOC_1sourceEDITED_before.inf is preferred, just rename to sysoc.inf & compressed it to sysoc.in_)

How SYSOC_2source_after.inf comes about, I dun know. It should not be there.
DefragSysoc.exe only look for sysoc.in_ in SOURCESS\i386 to process. If you have more than 1 copy of sysoc.in? in SOURCE\i386, then maybe DefragSysoc.exe process the wrong sysoc.in_ (Not tested)

Remove all other duplicated sysoc.in? in SOURCE\i386 folder if any.

Then test again in VM or let me know what is the error message generated by DefragSysoc.exe

View PostLilla, on 19 February 2010 - 02:58 PM, said:


I created HFSLIP_POST_DefragSysoc.cmd (contains only the line below)
"%~dp0DefragSysoc.exe"
I left the double-quotes in place as shown in the example in the article linked to below, please advise if they should be removed.
The double quote should not be removed unless the file full path to DefragSysoc.exe does not contain space.

Hope that helps,
Kinds regards

#4 User is offline   Lilla 

  • Junior
  • Pip
  • Group: Members
  • Posts: 68
  • Joined: 11-May 05

Posted 19 February 2010 - 09:24 PM

View PostGeej, on 19 February 2010 - 07:25 PM, said:

The backup file created by DefragSysoc (SOURCESS\I386\SYSOCBAK.IN_) does not exist because in SOURCE\i386 folder, sysoc.in_ is still having 2 [Components] sections.
(SYSOC_2source_after.inf)

You should only have 1 edited sysoc.in_ in your SOURCE\i386 folder.
(SYSOC_1sourceEDITED_before.inf is preferred, just rename to sysoc.inf & compressed it to sysoc.in_)

How SYSOC_2source_after.inf comes about, I dun know. It should not be there.
DefragSysoc.exe only look for sysoc.in_ in SOURCESS\i386 to process. If you have more than 1 copy of sysoc.in? in SOURCE\i386, then maybe DefragSysoc.exe process the wrong sysoc.in_ (Not tested)

Remove all other duplicated sysoc.in? in SOURCE\i386 folder if any.

Then test again in VM or let me know what is the error message generated by DefragSysoc.exe

View PostLilla, on 19 February 2010 - 02:58 PM, said:


I created HFSLIP_POST_DefragSysoc.cmd (contains only the line below)
"%~dp0DefragSysoc.exe"
I left the double-quotes in place as shown in the example in the article linked to below, please advise if they should be removed.
The double quote should not be removed unless the file full path to DefragSysoc.exe does not contain space.

Hope that helps,
Kinds regards


I know this is kind of hard to follow, but I did exactly as you instructed above and in your original post.

The problem seems to be with hfslip-1.7.10_beta_G.cmd. When I run it, it changes the edited version of \SOURCE\SYSOC.IN_ (that contains .INF) I put there (before running HFSLIP) so that it AGAIN has two components sections.

Is it perhaps a problem with beta G, is it changing \SOURCE\SYSOC.IN_ when it should be changing \SOURCESS\SYSOC.IN_ ? Have you tested using hfslip-1.7.10_beta_G.cmd?

Lilla

This post has been edited by Lilla: 19 February 2010 - 09:45 PM


#5 User is offline   Geej 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 634
  • Joined: 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag

Posted 20 February 2010 - 06:13 AM

I have tested with hfslip-1.7.10_beta_G.cmd, works okay on my side. (But I will check more on my SOURCE\I386 when I get home.)
Let me know what is the error message generated by defragsysoc.exe when run with HFSLIP.

Also I notice in HFTOOLS folder, you have HFANSWER.INF. I have it as HFANSWER.INI (Nav to Guidelines->Extra; item2)
I dun know if there is any different. You might want to rename this.

#6 User is offline   Lilla 

  • Junior
  • Pip
  • Group: Members
  • Posts: 68
  • Joined: 11-May 05

Posted 20 February 2010 - 12:23 PM

View PostGeej, on 20 February 2010 - 06:13 AM, said:

I have tested with hfslip-1.7.10_beta_G.cmd, works okay on my side. (But I will check more on my SOURCE\I386 when I get home.)
Let me know what is the error message generated by defragsysoc.exe when run with HFSLIP.

Where would this error message appear? There is nothing in HFSLIP.LOG (see SYSOC.ZIP in my earlier post). As stated above, after running HFSLIP...cmd to prepare the .iso, the \SOURCESS\I386 folder does not contain the backup file created by defragsysoc.exe, so it doesn't appear that it runs.

Due to the above, I did not create a CD and install from it. But, I will do so if you think this would provide any additional information to work with. Please advise.

View PostGeej, on 20 February 2010 - 06:13 AM, said:

Also I notice in HFTOOLS folder, you have HFANSWER.INF. I have it as HFANSWER.INI (Nav to Guidelines->Extra; item2)
I dun know if there is any different. You might want to rename this.

Done. I changed HFANSWER.INF to HFANSWER.INI - Thanks for letting me know.

Thank you for trying to help figure out what is happening (or not happening) here.

Lilla

#7 User is offline   Geej 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 634
  • Joined: 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag

Posted 21 February 2010 - 01:10 AM

The error would only appear when DefragSysoc.exe is ran. It doesn't write to any log file.

Here is a way to manually simulate it.

Assuming on C:\ root, create a dummy folder call Dummy (i.e C:\Dummy)
In C:\Dummy, create HFTOOLS, SOURCE\I386 & SOURCESS\I368 folders
Put your Edited sysoc.IN_ in C:\Dummy\SOURCE\I386
Put DefragSysoc.exe in C:\Dummy\HFTOOLS
(You may wish to run a quick check in HFTOOLS. Just open in console box and run this command, DefragSysoc /check)

Put SYSOC_3sourcess_after.inf in C:\Dummy\SOURCESS\I368
Make sure SYSOC_3sourcess_after.inf is rename to SYSOC.inf. Then manually merge this line
[Components]
msnexplr=ocmsn.dll,OcEntry,msnmsn.inf,,7

to the main [Components]. Remove this [Components] string. So now you have 2 [Components] section.
Makecab to SYSOC.IN_. Then delete SYSOC.INF

Double click on DefragSysoc.exe to let it process.

After run, check the content of SYSOC.INF in your SOURCESS. You should be able to see SYSOCBAK.IN_ as well.

Normally When I run HFSLIP, I would let it create the iso as well. Ususally all these are unattended.
I still have no clue why HFSLIP is modifying your SOURCE. It doesn't modify mine in my case. Sorry to say that.

===== update DefragSysoc.exe to include quick check on SOURCE\I386\SYSOC.IN_
See 1st post for detail. Thanks

#8 User is offline   Lilla 

  • Junior
  • Pip
  • Group: Members
  • Posts: 68
  • Joined: 11-May 05

Posted 21 February 2010 - 05:29 PM

Geej,

When I run HFSLIP I get the error message shown in the attachment. This is consistent with what I have been saying, that after running HFSLIP, the \SOURCE\SYSOC.IN_ file that I created (I combined the 2 components sections into 1) has been changed by HFSLIP to one with again 2 component sections. Thus, \SOURCESS\SYSOC.IN_ winds up having 3 components sections.

I didn't see this message earlier because I wasn't watching the screen. Perhaps it would be better if this message didn't clear automatically.

Since HFSLIP changes the \SOURCE\SYSOC.IN_ file on my system, I will have to give up on using DefragSysoc.exe, at least until/unless this can be resolved.

Thank you for your help,
Lilla

Attached File(s)


This post has been edited by Lilla: 21 February 2010 - 06:23 PM


#9 User is offline   Geej 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 634
  • Joined: 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag

Posted 22 February 2010 - 10:06 PM

Hi Lilla
I have re-script to suit your situation. It's Defrag2Sysoc.exe. (The number 2 here means defrag with 2 [Components] sections in SOURCE.)
Script towards your given SYSOC_3sourcess_after.inf, meaning SYSOC.INF should have the following orders in your SOURCE:
[Version]
[Components]
[Global]
[Components] <--Location must be right after [Global] and before [Strings] sections
[Strings]


Hope that solve the problem.

Defrag2Sysoc.exe still support /check switch
- Add /nobackup switch if you want SYSOCBAK.IN_ to be deleted after run.
- Has also modify code to check SOURCE\I386 but still need user to visual inspect/edit the file.
Script will expand to inspect numbers of [Components] section,
Ask if user wish to open sysoc.inf using default notepad for viewing/editing
If yes, open file. After user save/modify/no modify the file, user close the file,
the script will makecab it to SYSOC.IN_ . Then finally delete sysoc.inf and exit script)
BTW, if there is any error, error message will not timeout.

Hence any user is able to use this alternative script if their SOURCE matches the above requrirement listed in the codebox.

Just modify HFSLIP_POST_Defrag2Sysoc.cmd to below code (or DL this simple cmd attachment to HFTOOLS folder)
"%~dp0Defrag2Sysoc.exe"
or
"%~dp0Defrag2Sysoc.exe" /nobackup


Edit 30-Apr-2010: Alternatve script removed as main script able to handles multiple [Components] sections

This post has been edited by Geej: 30 April 2010 - 12:35 AM


#10 User is offline   Lilla 

  • Junior
  • Pip
  • Group: Members
  • Posts: 68
  • Joined: 11-May 05

Posted 24 February 2010 - 01:32 PM

View PostGeej, on 22 February 2010 - 10:06 PM, said:

Hi Lilla
I have re-script to suit your situation. It's Defrag2Sysoc.exe. (The number 2 here means defrag with 2 [Components] sections in SOURCE.)
Script towards your given SYSOC_3sourcess_after.inf, meaning SYSOC.INF should have the following orders in your SOURCE:
[Version]
[Components]
[Global]
[Components] <--Location must be right after [Global] and before [Strings] sections
[Strings]

Hope that solve the problem.
Good work! It solved the problem. It worked and it was so easy. All I had to do was to put Defrag2Sysoc.exe and HFSLIP_POST_Defrag2Sysoc.cmd in \TOOLS folder, and run HFSLIP (1.7.10 beta g)

View PostGeej, on 22 February 2010 - 10:06 PM, said:

Defrag2Sysoc.exe still support /check switch
- Has also modify code to check SOURCE\I386 but still need user to visual inspect/edit the file. Script will expand to inspect numbers of [Components] section, Ask if user wish to open sysoc.inf using default notepad for viewing/editing If yes, open file. After user save/modify/no modify the file, user close the file, the script will makecab it to SYSOC.IN_ . Then finally delete sysoc.inf and exit script) BTW, if there is any error, error message will not timeout.

As I understand it, the above would only happen if I used the /check switch, which I didn't do. I of course had already confirmed that I met the requirements (2 components sections; section names and order matching that given in first quote in this post). I did not edit anything. It didn't ask me anything, nothing opened up, no error message. All appears to have worked perfectly!

View PostGeej, on 22 February 2010 - 10:06 PM, said:

Hence any user is able to use this alternative script if their SOURCE matches the above requriement listed in the codebox.

Just modify HFSLIP_POST_DefragSysoc.cmd to
"%~dp0Defrag2Sysoc.exe"

Defrag2Sysoc.exe
Size: 305.74 Kb (313,073 bytes)
MD5: 396874C19549BAF007F8838B6F9FA3B6
I used the name HFSLIP_POST_Defrag2Sysoc.cmd (with the 2 in it for consistency with the name of the .exe).

FYI. Defrag2Sysoc.exe and HFSLIP_POST_Defrag2Sysoc.cmd are not detected as threats by...
- Microsoft Security Essentials (MSE) - antivirus +
- Spybot Search & Destroy
- MalwareBytes AntiMalware

I attached some files in case you (or others) want to check what happened here.
A summary of the files attached:

0 SYSOC.INF (in \SOURCE\SYSOC.IN_) before HFSLIP+Defrag2Sysoc.exe
Contents: 27 entries in 2 [Components] sections

1 SYSOC.INF (in \SOURCES\SYSOC.IN_) after HFSLIP+Defrag2Sysoc.exe
Contents: 32 entries in 2 [Components] sections

2 SYSOC.INF (in \SOURCESS\SYSOCBAK.IN_) after HFSLIP+Defrag2Sysoc.exe
A backup copy of SOURCESS\SYSOC.IN_ made by Defrag2Sysoc.exe before it makes any changes.
Contents: 35 entries in 3 [Components] sections.

2 SYSOC.INF (in \SOURCESS\SYSOC.IN_) after HFSLIP+Defrag2Sysoc.exe
This file contains the result of Defrag2Sysoc.exe, i.e. it defrags the components section.
Contents: 35 entries in 1 [Components] section; the components sections is defragged.

HFSLIP.LOG

---

Thank you so very much for getting this to work for me. I hope others will try it too.

Lilla

Attached File(s)


This post has been edited by Lilla: 24 February 2010 - 08:08 PM


#11 User is offline   Geej 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 634
  • Joined: 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag

Posted 20 March 2010 - 09:41 PM

Update the 2 scripts (in Post #1 & #9)

- Now writes from line 2 and add a blank line at end of file
B'cause it will look neater if there is a 'delete entry' operation to sysoc.inf such as program uninstall.
[Components] section will be moved down automatically by XP once there is a delete operation.
- Tidy up internal codes
- Add a switch /nobackup if you want SYSOCBAK.IN_ to be deleted in SOURCESS\I386 after run.
It will only be deleted if defragsysoc.exe or defrag2sysoc.exe completed successfully.
A small log (defragsysoc.log or defrag2sysoc.log) will be created in HFTOOLS, indicating it's status.
- To run with /nobackup, HFSLIP_POST_DefragSysoc.cmd or HFSLIP_POST_Defrag2Sysoc.cmd need to change to
"%~dp0DefragSysoc.exe" /nobackup
or
"%~dp0Defrag2Sysoc.exe" /nobackup

:)

#12 User is offline   Lilla 

  • Junior
  • Pip
  • Group: Members
  • Posts: 68
  • Joined: 11-May 05

Posted 22 March 2010 - 10:32 AM

View PostGeej, on 20 March 2010 - 09:41 PM, said:

Update the 2 scripts (in Post #1 & #9)

- Now writes from line 2 and add a blank line at end of file
B'cause it will look neater if there is a 'delete entry' operation to sysoc.inf such as program uninstall.
[Components] section will be moved down automatically by XP once there is a delete operation.
- Tidy up internal codes
- Add a switch /nobackup if you want SYSOCBAK.IN_ to be deleted in SOURCESS\I386 after run.
It will only be deleted if defragsysoc.exe or defrag2sysoc.exe completed successfully.
A small log (defragsysoc.log or defrag2sysoc.log) will be created in HFTOOLS, indicating it's status.
- To run with /nobackup, HFSLIP_POST_DefragSysoc.cmd or HFSLIP_POST_Defrag2Sysoc.cmd need to change to
"%~dp0DefragSysoc.exe" /nobackup
or
"%~dp0Defrag2Sysoc.exe" /nobackup

:)


Very nice!

I think this is a subtle problem that most are not aware of. It is amazing that you understand it and developed a solution. It would be a shame if your valuable work gets lost by rolling to the back pages of this forum. To preserve your work, it would be helpful to the HFSLIP community, if this issue and your solution could be documented on tommyp's HFSLIP.org page, and included on mimo's update list with perhaps a link to this thread.
Lilla

This post has been edited by Lilla: 22 March 2010 - 11:52 AM


#13 User is offline   bphlpt 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,122
  • Joined: 12-May 07

Posted 22 March 2010 - 10:58 AM

Should this functionality be included in HFSLIP itself and always run, or do I not understand the purpose and usefulness of this script? Could anything bad happen if this is always run after every use of HFSLIP? Why would you not want to run it and defrag sysoc.inf?

Cheers and Regards

#14 User is offline   Mim0 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 715
  • Joined: 23-September 08

Posted 22 March 2010 - 01:42 PM

View Postbphlpt, on 22 March 2010 - 10:58 AM, said:

Should this functionality be included in HFSLIP itself and always run, or do I not understand the purpose and usefulness of this script? Could anything bad happen if this is always run after every use of HFSLIP? Why would you not want to run it and defrag sysoc.inf?
Yes, that's what I'm asking me also. Sorry Posted Image

I support Lilla's idea to put a link it to the XP-list. It sounds interesting but when reading there are so much "if this.. if that... ensure this... check that...". Posted Image For a "normal user" who is not editing inf's manually (like me Posted Image ), is there an easy way? Like "just download it"? Any disadvantages?

Appears the problem of a fragmented file only for deinstalling windows-components which are installed by default?

This post has been edited by Mim0: 22 March 2010 - 01:43 PM


#15 User is offline   Lilla 

  • Junior
  • Pip
  • Group: Members
  • Posts: 68
  • Joined: 11-May 05

Posted 22 March 2010 - 02:53 PM

View PostMim0, on 22 March 2010 - 01:42 PM, said:

View Postbphlpt, on 22 March 2010 - 10:58 AM, said:

Should this functionality be included in HFSLIP itself and always run, or do I not understand the purpose and usefulness of this script? Could anything bad happen if this is always run after every use of HFSLIP? Why would you not want to run it and defrag sysoc.inf?
Yes, that's what I'm asking me also. Sorry Posted Image

I support Lilla's idea to put a link it to the XP-list. It sounds interesting but when reading there are so much "if this.. if that... ensure this... check that...". Posted Image For a "normal user" who is not editing inf's manually (like me Posted Image ), is there an easy way? Like "just download it"? Any disadvantages?

Appears the problem of a fragmented file only for deinstalling windows-components which are installed by default?


Geej, regarding an easy way, some thoughts/questions...

Consider, as part of the "easy way" perhaps you could...
o add HFSLIP_POST_DefragSysoc.cmd (with the one line command in it) to post #1
o add HFSLIP_POST_Defrag2Sysoc.cmd (with the one line command in it) to post #9
While it's easy to make these .cmd files, it's not as easy as clicking a download link. Also, a novice user could make a mistake when creating this file.

Now, in thinking about a possible "easy way", as I understand it...
o DefragSysoc.exe will abort if Sysoc.ini (in Source\Sysoc.in_) contains more or less than 1 components section, or if sections are not in expected order.
o Defrag2Sysoc.exe will abort if Sysoc.ini (in Source\Sysoc.in_) contains more or less than than 2 components, or if sections are not in expected order.

Which makes me wonder if something like this would work.
Simply place all four files (shown below) in HFTOOLS and let both run as they will abort if not needed.
- DefragSysoc.exe and HFSLIP_POST_DefragSysoc.cmd
- Defrag2Sysoc.exe and HFSLIP_POST_Defrag2Sysoc.cmd

In the future, consider (if it makes sense to you) combining DefragSysoc.exe and Defrag2Sysoc.exe, with a branch to the correct logic. Then users would only have to download two files (.exe and .cmd file). Just a thought.

Lilla

This post has been edited by Lilla: 22 March 2010 - 03:01 PM


#16 User is offline   bphlpt 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,122
  • Joined: 12-May 07

Posted 22 March 2010 - 06:29 PM

View PostLilla, on 22 March 2010 - 02:53 PM, said:

Simply place all four files (shown below) in HFTOOLS and let both run as they will abort if not needed.
- DefragSysoc.exe and HFSLIP_POST_DefragSysoc.cmd
- Defrag2Sysoc.exe and HFSLIP_POST_Defrag2Sysoc.cmd

In the future, consider (if it makes sense to you) combining DefragSysoc.exe and Defrag2Sysoc.exe, with a branch to the correct logic.


This seems obvious. Doesn't make sense to have to need both versions when they could be combined. And on those rare occasions when there are more than 2 components sections, couldn't it be made to handle those, too, if indeed it is always better to only have 1 section?

Just putting the cmd file(s) in HFTOOLS causes them to be run, right?

No one has addressed the question "Why would you not want to run it and defrag sysoc.inf?" And if we always would want to run it, shouldn't we lobby tommyp to fold the functionality of this into HFSLIP itself? Giving full credit to Geej, of course. Then you wouldn't have to add anything anywhere. I mean, if the actions of HFSLIP causes this situation, and if it is better if this situation is cleaned up, then shouldn't HFSLIP "clean up its own house"? (Absolutly no offense meant, tommyp! :) ) I guess if Geej is right in his original post and both nLite and Ryan's Integrator both do something similar, it kind of implies ... Well, anyway, just a thought to consider. I realize that there could very well be extremely valid reasons that I am not aware of as to why it should be an "external" option, or maybe not be done at all. I'm interested in hearing the opinions of others, especially tommyp and fdv. After all, their thoughts are the ones that matters most, with their experience, knowledge, and control of the inner workings of HFSLIP.

Cheers and Regards

This post has been edited by bphlpt: 22 March 2010 - 09:42 PM


#17 User is offline   Geej 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 634
  • Joined: 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag

Posted 23 March 2010 - 01:52 AM

Lilla, bphlpt & Mino
Just to sum up my thought too...

Lilla has pointed correctly that this is a subtle problem that most are not aware of. I only aware of it when I was learning inf addon. I observed nlite & RMVi user do not complain after uninstall application from sysoc.inf. Which made me observed/monitor entry to sysoc.inf after an uninstall. Hence my observation that the whole portion made by HFSLIP is wipe out after sysoc.inf did an update to it's entry. Also I compare sysoc.inf made by nlite & RMVi. nlite can combined any multiple section of [Components] while RMVi only combine 1st & last sections of [Components], leaving out the middle [Components].

Most of HFSLIP's user do not test the uninstall part of sysoc.inf application. So I think they do not see this subtle problem.
If user do not feed their HLSliped sourcess to nlite or RMVi, this utility is useful. No harm using it, right?

bphlpt, just follow post #1 instruction if you want to use it. Ignore #9. #9 is developed due to the unique situation of Lilla. I hope any user who wish to defrag their sysoc.inf, please stick to #1 instruction. (There is no need to download both exe.). Also I use #1's exe myself
In my opinion, if you use HFSLIP only to slipstream, then I think it is pretty essential. Unless you don't use sysoc addon.

Min0, there is no fix [Components] section in your SOURCE. It may varies by the number of [Components] section. I'm unable to write a complex script when input varies. Hence user need to ensure sysoc.inf In SOURCE has a predefined sequence. You only need to edit once in your SOURCE. After that, you can re-slip over and over again. (not too hard, right?)
The problem only appear when an application does it uninstall thru it's inf and update the entry (by deleting) in sysoc.inf. You need to check the program's inf whether it has an update to sysoc entry or not. This part is subjective.

I would also love to hear from others esp tommyp and fdv too

Cheers

#18 User is offline   Mim0 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 715
  • Joined: 23-September 08

Posted 23 March 2010 - 05:44 AM

Could this be a solution: I've wrote a script for defragmenting, regardless how many components-sections are inside of the inf. I compared it with the INFs of Lilla's attachement - the result is exactly the same. When no changes are required, probably tommy can add it into HFSLIP?

@ECHO OFF

SETLOCAL EnableExtensions 
SETLOCAL EnableDelayedExpansion

CALL :DfrgInf SOURCESS\I386\SYSOC.IN_
GOTO :EOF

-------------------------------------------------------------------------
Function: DfrgInf - Defragments an INF-file (e.g. SOURCESS\I386\SYSOC.IN_)
Parameters:
%1 - Path and name of the compressed INF-file (*.IN_)
-------------------------------------------------------------------------
:DfrgInf
SET infFile=%1
IF EXIST !infFile! (
  SET tmpInf=%~n1.INF
  SET tmpPrefix=~dfrg_
  SET section=
  SET sects=
  DEL !tmpPrefix!*.tmp >NUL 2>NUL
  EXPAND !infFile! !tmpInf!>NUL
  FOR /F "tokens=1 delims=|" %%a IN (!tmpInf!) DO (
	SET line=%%a
	SET firstChar=!line:~0,1!
	IF !firstChar!==[ (
  	SET section=!line:[=!
  	SET section=!section:]=!
  	SET sects=!sects! !section!
	) ELSE IF NOT !section!_==_ (
  	ECHO %%a>>!tmpPrefix!!section!.tmp
	)
  )
  ECHO.>!tmpInf!
  FOR %%s in (!sects!) DO (
	IF EXIST !tmpPrefix!%%s.tmp (
  	ECHO [%%s]>>!tmpInf!
  	COPY !tmpInf!+!tmpPrefix!%%s.tmp !tmpInf! >NUL 2>NUL
  	DEL !tmpPrefix!%%s.tmp
  	ECHO.>>!tmpInf!
	)
  )
  MAKECAB !tmpInf! !infFile!>NUL
  DEL !tmpInf! >NUL 2>NUL
)
GOTO :EOF

This post has been edited by Mim0: 23 March 2010 - 01:00 PM


#19 User is offline   Geej 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 634
  • Joined: 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag

Posted 23 March 2010 - 10:22 PM

It will be nice if HFSLIP can address it directly, w/o needing 3rd party tool :)

#20 User is offline   bphlpt 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,122
  • Joined: 12-May 07

Posted 24 March 2010 - 01:01 AM

No comments by fdv or tommyp?

Cheers and Regards

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy