djbe Posted June 11, 2005 Share Posted June 11, 2005 (edited) 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 -remIf 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...Fedit_with_icon.rarFedit_without_icon.rar Edited August 3, 2005 by djbe Link to comment Share on other sites More sharing options...
n7Epsilon Posted June 11, 2005 Share Posted June 11, 2005 (edited) 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 June 11, 2005 by ChipCraze23 Link to comment Share on other sites More sharing options...
djbe Posted June 12, 2005 Author Share Posted June 12, 2005 (edited) 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 June 12, 2005 by djbe Link to comment Share on other sites More sharing options...
djbe Posted August 3, 2005 Author Share Posted August 3, 2005 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. Link to comment Share on other sites More sharing options...
Jito463 Posted August 4, 2005 Share Posted August 4, 2005 This will definitely come in handy when I'm modifying my txtsetup.sif with more drivers. Thanks, djbe. Link to comment Share on other sites More sharing options...
Bilou_Gateux Posted August 8, 2006 Share Posted August 8, 2006 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 scriptgsar -sPlayer:x22:x2c0x00010001:x2c1 -rPlayer:x22:x2c0x00010001:x2c0 -o ..\inf\syssetup.infsed scriptmove /y ..\inf\syssetup.inf ..\inf\syssetup.txtsed 's/"Windows Media Player",0x00010001,1/"Windows Media Player",0x00010001,0/g' ..\inf\syssetup.txt >..\inf\syssetup.inffedit scriptfedit -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" -onceThe 3 scripts do the same thing: replace value 1 with value 0 in this linesyssetup.inf[WMPFeature.AddReg]HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\WindowsFeatures","Windows Media Player",0x00010001,0 Link to comment Share on other sites More sharing options...
sweept Posted August 21, 2008 Share Posted August 21, 2008 trying to fedit -add -once -f file.txt -a(fter) "this line"-l "this text"or am i doing it wrongly ?? Link to comment Share on other sites More sharing options...
sweept Posted August 24, 2008 Share Posted August 24, 2008 (edited) 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 pointlessdoes it work for any of you guys if it does use what command?TIA Edited August 24, 2008 by sweept Link to comment Share on other sites More sharing options...
Ascii2 Posted August 25, 2008 Share Posted August 25, 2008 What is the function of Fedit? Link to comment Share on other sites More sharing options...
Myrmex Posted December 10, 2008 Share Posted December 10, 2008 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" -onceDoing 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 addressThank's again !Myrmex Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now