MSFN Forum: Fedit - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Fedit Rate Topic: -----

#1 User is offline   djbe 

  • Member
  • PipPip
  • Group: Members
  • Posts: 169
  • Joined: 20-October 04

Posted 11 June 2005 - 05:40 AM

Hi,

I noticed people here and there have started using Fedit. I even got mails asking "am I allowed to use it?". Well the answer is YES! I'm glad this utility helps some people. So I'm now posting it in public.

The latest version of Fedit is 2.0. The size is 122KB, but you can bring that down a lot by using UPX compression and removing the icon (First remove the icon, then UPX). The syntax for using Fedit is:

  -add
      Tells Fedit to add LINE.
   -rem
      Tells Fedit to remove LINE.
   -f "some file"
      The file to be edited
   -l "some text"
      The text to be added or removed

 When adding, these are additional (optional) parameters:
   -a[:co] "some text"
      The text will be added after this line
   -b[:co] "some text"
      The text will be added before this line
   -s[:c] "some text"
      The text will be added in the section [some text]
   -once
      The text to be added, will only be added once in the whole file
   -create
      If the section isn't found, it will be created

 When removing, -l supports the parameter [:co], and these additional
 (optional) parameters:
   -a[:co] "some text"
      All instances of the text after this line will be removed.
   -b[:co] "some text"
      All instances of the text before this line will be removed.
   -s[:c] "some text"
      All instances of the text in section [some text] will be removed.
   -once
      The text to be removed, will only be removed once.

 The option [:co] means the following:
 If you have a parameter -a "some text", Fedit will automatically search for
 strings that match it (without being case sensitive). If you want it to be
 case sensitive, change it to this:
   -a:c "some text"
 If you think that 'some text' is contained in a bigger string like 'this is
 some text written somewhere', then change it to this:
   -a:o "some text"
 You can combine both to this:
   -a:co "some text"

 IMPORTANT: none of the parameters are case sensitive, so for example -rem is
   the same as -Rem or -REM. Same thing for -a:co or -A:CO
 IMPORTANT: the order of the parameters is unimportant, so:
   Fedit -rem -f file -l:co text
 Is the same as:
   Fedit -f file -l:oc text -rem


If you have any problems or requests, post here please. There are two attachments: the normal Fedit, and the Fedit without icon and UPX-ed.

Updated 3 August 2005: Totally rewritten fedit, adding many features like before, casesensitive, contained, and less disk access so speed should have increased...

Attached File(s)


This post has been edited by djbe: 03 August 2005 - 04:25 PM



#2 User is offline   n7Epsilon 

  • Currently Learning: C#, JavaScript, PHP
  • PipPip
  • Group: Members
  • Posts: 156
  • Joined: 11-February 05

Posted 11 June 2005 - 01:14 PM

Hi,
I cannot thank you enough for releasing this tool (I have been searching for this for ages and ages on the net and in MSFN)....

--> Was trying mind boggling ways to create a DOS utility using GSAR.EXE (Global Search and Replace) to accomplish such a task !!! -- Thank you again....

Oh: and BTW, UPX doesn't work, gives an "UncompressibleFileException"

syntax is: UPX --best -f FEDIT.EXE

-> Makecab the file cuts size down to 42KB so UPX is not working...

This post has been edited by ChipCraze23: 11 June 2005 - 01:24 PM


#3 User is offline   djbe 

  • Member
  • PipPip
  • Group: Members
  • Posts: 169
  • Joined: 20-October 04

Posted 12 June 2005 - 12:46 PM

I'm sorry, totally forgot about that. You have to remove the icon before compressing Fedit with UPX. To make it easy for everyone, I've posted an Fedit without icon and UPX-ed.

This post has been edited by djbe: 12 June 2005 - 12:49 PM


#4 User is offline   djbe 

  • Member
  • PipPip
  • Group: Members
  • Posts: 169
  • Joined: 20-October 04

Posted 03 August 2005 - 04:27 PM

Hello everyone,

I've updated Fedit to v2.0. With this update I've totally rewritten Fedit, now there is almost no disk access, wich should result in a great speed increase, and new features such as case sensitive/unsensitive, substring searching and a "before" line.

#5 User is offline   Jito463 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 442
  • Joined: 01-July 04

Posted 03 August 2005 - 08:55 PM

This will definitely come in handy when I'm modifying my txtsetup.sif with more drivers. :)

Thanks, djbe.

#6 User is offline   Bilou_Gateux 

  • Powered by Windows Embedded
  • PipPipPipPipPip
  • Group: Members
  • Posts: 766
  • Joined: 03-January 04

Posted 08 August 2006 - 10:40 AM

View Postdjbe, on Aug 3 2005, 11:27 PM, said:

Hello everyone,

I've updated Fedit to v2.0. With this update I've totally rewritten Fedit, now there is almost no disk access, wich should result in a great speed increase, and new features such as case sensitive/unsensitive, substring searching and a "before" line.


Very usefull tool. I'm using it whereas other tools (gsar.exe or sed.exe) canno't be used before T39 (ntvdm error in my VM Virtual Machine.

Missing is a replace option to change data:
gsar script
gsar -sPlayer:x22:x2c0x00010001:x2c1 -rPlayer:x22:x2c0x00010001:x2c0 -o ..\inf\syssetup.inf


sed script
move /y ..\inf\syssetup.inf ..\inf\syssetup.txt
sed 's/"Windows Media Player",0x00010001,1/"Windows Media Player",0x00010001,0/g' ..\inf\syssetup.txt >..\inf\syssetup.inf


fedit script
fedit -f ..\inf\syssetup.inf -rem -l:c "HKLM,\"SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\WindowsFeatures\",\"Windows Media Player\",0x00010001,1"
fedit -f ..\inf\syssetup.inf -add -l "HKLM,\"SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\WindowsFeatures\",\"Windows Media Player\",0x00010001,0" -s:c "WMPFeature.AddReg" -once


The 3 scripts do the same thing: replace value 1 with value 0 in this line
syssetup.inf

Quote

[WMPFeature.AddReg]HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\WindowsFeatures","Windows Media Player",0x00010001,0


#7 User is offline   sweept 

  • Junior
  • Pip
  • Group: Members
  • Posts: 61
  • Joined: 08-November 05

Posted 21 August 2008 - 03:56 AM

trying to
fedit -add -once -f file.txt -a(fter) "this line"-l "this text"

or am i doing it wrongly ??

#8 User is offline   sweept 

  • Junior
  • Pip
  • Group: Members
  • Posts: 61
  • Joined: 08-November 05

  Posted 24 August 2008 - 02:13 PM

this isn't working for me with -a switch wile -b switch seems to work just fine.
now I'm puzzled with this tool

do you need to specify the whole line to match or a partly matched will do ? what ever i did it did work with the -b switch so this question is a bit pointless
does it work for any of you guys if it does use what command?

TIA

This post has been edited by sweept: 24 August 2008 - 02:15 PM


#9 User is offline   Ascii2 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 427
  • Joined: 31-December 06

Posted 25 August 2008 - 03:08 AM

What is the function of Fedit?

#10 User is offline   Myrmex 

  • Group: Members
  • Posts: 5
  • Joined: 27-February 05

Posted 10 December 2008 - 06:33 AM

Hi there,

Thank's for this great tool.
I'm currently trying to put some changes in my files HIVExxx.inf in i386 of an XP SP3 install CD.
Without success because those files are in UNICODE.

I'm trying to do some changes like:

fedit -add -f "HIVEDEF.INF" -s "AddReg" -l "HKCU,\"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\",\"StartMenuAdminTools\",0x00000000,\"YES\"" -once 
fedit -add -f "HIVEDEF.INF" -s "AddReg" -l "HKCU,\"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\",\"Hidden\",0x00010001,0x00000001" -once 
fedit -add -f "HIVEDEF.INF" -s "AddReg" -l "HKCU,\"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\",\"ShowCompColor\",0x00010001,0x00000001" -once

Doing it on UNICODE file results in an unreadable file as result.

While converting *.INF files to ANSI before doing changes with fedit gave me the awaited result.

If you do not plan to integrate support for UNICODE in your tool, there is a workaround.
Just convert the file to ANSI before the change.
I did it with StringConverter.
This free command-line tool can be found at this address

Thank's again !
Myrmex

Share this topic:


Page 1 of 1
  • 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