Jump to content

Deletion text content


Recommended Posts

But I thought all you wanted was to remove a section. Right now I'm not totally sure what your real needs are (probably more than just removing some lines)

I mean, if I add this, is the next request going to be "replacing a line" or such? -- not that there's anything wrong with that! But adding features like that one by one is more work than doing a fully featured app in the first place (this way, you're not deleting half your code every single time to add features, and making big changes in things like parsing command line arguments). I'd be better off to rewrite it all from scratch instead of just making changes to this very simple script all the time, and preferably in another language too (most likely as a C# Console App).

Doesn't this get us back to the original suggestion by Yzöwl? :whistle:

There already exist "third party tools" to manage .ini or .inf structured files, like the suggested Inimod, these ones:

http://www.nirsoft.net/utils/nircmd2.html#using

http://www.spiderharper.com/software/utilities/inifile.htm

http://www.otbsw.com/

http://www.otbsw.com/Files/inimod12.zip

http://www.ericphelps.com/setini/index.htm

the iniman tool in Server 2003 Resource Kit, and God only knows how many more.

and even more "complete" scripts:

http://www.robvanderwoude.com/batexamples_r.html#ReadINI

http://www.robvanderwoude.com/vbstech_files_ini.html

http://www.robvanderwoude.com/wshexamples_i.html#I

programmers libraries/classes:

http://www.codeproject.com/KB/applications/iniutils.aspx

http://www.codeproject.com/KB/files/win32f...ilityclass.aspx

jaclaz

Link to comment
Share on other sites


Doesn't this get us back to the original suggestion by Yzöwl? :whistle:

There already exist "third party tools" to manage .ini or .inf structured files <snip>

Also if I remember correctly in your last post in this forum I supplied you with a tool name and syntax for removing a line, GSAR.

As jaclaz, (and now crahak), suggest there are more important things to do than create one off specialist scripts or tools for your/limited use. There are a handful of freeware utilities already made and available which will cover most of your needs.

Link to comment
Share on other sites

Doesn't this get us back to the original suggestion by Yzöwl?

I was actually going to suggest using that, but IniMod doesn't seemingly support deleting lines from inf files (after all, it's a .ini tool, no an inf one), such as:

HKLM,"SYSTEM\CurrentControlSet\Services\gagp30kx,"%gagp30kx_svcdesc%

Or at least that's what it seems like -- haven't actually tried. Most ini tools would need a proper ini syntax to work (you'd think so at least), i.e. key=value to modify them, and inf files for the most part aren't like that (no key on most lines!)

I haven't looked at the ones you linked to either, perhaps one does the job. Personally, I didn't have to edit/modify an inf file in several years (and even back then, I used notepad for that), so I don't keep up with the list of specialized inf toys. If one of those does what he needs, then by all means... I like writing small tools that scratch a personal itch of mine, but I have no use at all for an inf tool. This script was meant as a specialized tool (a quick 5 minute scripting job) for a very specific purpose (it was simple and did the job just fine), but now that his needs have changed it's probably not the best tool anymore. At this point, it's up to him to try different apps.

Link to comment
Share on other sites

Thank you, have supported unicode

It only took a couple minutes to make the changes. No thanks needed :)

Can be more functional?

Yes, it could be. But I thought all you wanted was to remove a section. Right now I'm not totally sure what your real needs are (probably more than just removing some lines)

I mean, if I add this, is the next request going to be "replacing a line" or such? -- not that there's anything wrong with that! But adding features like that one by one is more work than doing a fully featured app in the first place (this way, you're not deleting half your code every single time to add features, and making big changes in things like parsing command line arguments). I'd be better off to rewrite it all from scratch instead of just making changes to this very simple script all the time, and preferably in another language too (most likely as a C# Console App).

It's pretty simple to do. I could make a fancy inf tool (with options to add/delete/replace values, lines and such, joining files, and maybe even simple taking commands from text files or such) and write basic documentation for it (i.e. command line usage, how to escape some characters, etc). I'll put it on my (long) list of pet projects. I'll get around to it sometime... I'm not quite sure just how much interest there is in such a tool, nor how useful it would be, so it's not exactly my top priority for now.

I hope you make inf tool

Similar http://www.msfn.org/board/Fedit-t48200.html

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...