Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Fedit

- - - - -

  • Please log in to reply
9 replies to this topic

#1
djbe

djbe

    Member

  • Member
  • PipPip
  • 169 posts
  • Joined 20-October 04
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 Files


Edited by djbe, 03 August 2005 - 04:25 PM.

AMD 3500+ (Winchester) @ 2.64Ghz :: 4 x 512 MB PC3200 @ 2-8-3-3-2
Asus GeForce 6800GT 256MB :: Asus A8N-SLI Motherboard
Maxtor 160GB x 2 Raid 0 :: DVD Writer + DVD Reader


How to remove advertisement from MSFN

#2
n7Epsilon

n7Epsilon

    Currently Learning: C#, JavaScript, PHP

  • Member
  • PipPip
  • 156 posts
  • Joined 11-February 05
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...

Edited by ChipCraze23, 11 June 2005 - 01:24 PM.


#3
djbe

djbe

    Member

  • Member
  • PipPip
  • 169 posts
  • Joined 20-October 04
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.

Edited by djbe, 12 June 2005 - 12:49 PM.

AMD 3500+ (Winchester) @ 2.64Ghz :: 4 x 512 MB PC3200 @ 2-8-3-3-2
Asus GeForce 6800GT 256MB :: Asus A8N-SLI Motherboard
Maxtor 160GB x 2 Raid 0 :: DVD Writer + DVD Reader

#4
djbe

djbe

    Member

  • Member
  • PipPip
  • 169 posts
  • Joined 20-October 04
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.
AMD 3500+ (Winchester) @ 2.64Ghz :: 4 x 512 MB PC3200 @ 2-8-3-3-2
Asus GeForce 6800GT 256MB :: Asus A8N-SLI Motherboard
Maxtor 160GB x 2 Raid 0 :: DVD Writer + DVD Reader

#5
Jito463

Jito463

    Advanced Member

  • Member
  • PipPipPip
  • 442 posts
  • Joined 01-July 04
  • OS:none specified
  • Country: Country Flag
This will definitely come in handy when I'm modifying my txtsetup.sif with more drivers. :)

Thanks, djbe.
Help us help YOU! <-- Click here

#6
Bilou_Gateux

Bilou_Gateux

    Powered by Windows Embedded

  • Member
  • PipPipPipPipPip
  • 768 posts
  • Joined 03-January 04

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

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


OS Version = 5.1.2600 Service Pack 3
Platform ID = 2 (NT)
Service Pack = 3.0
Suite = 0x0140
Product Type = 1
Architecture = x86

#7
sweept

sweept

    Junior

  • Member
  • Pip
  • 69 posts
  • Joined 08-November 05
trying to
fedit -add -once -f file.txt -a(fter) "this line"-l "this text"

or am i doing it wrongly ??

#8
sweept

sweept

    Junior

  • Member
  • Pip
  • 69 posts
  • Joined 08-November 05
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

Edited by sweept, 24 August 2008 - 02:15 PM.


#9
Ascii2

Ascii2

    Advanced Member

  • Member
  • PipPipPip
  • 427 posts
  • Joined 31-December 06
What is the function of Fedit?

#10
Myrmex

Myrmex
  • Member
  • 5 posts
  • Joined 27-February 05
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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN