You are here

edit info in a .dat file

5 posts / 0 new
Last post
Travis Carrico
Offline
Last seen: 15 years 4 months ago
Developer
Joined: 2006-10-22 00:30
edit info in a .dat file

is there any way to edit a .dat file from nsis or possibly another scripting language? i know it depends on the .dat file. the one i'm interested in when opened with notepad is mostly a bunch of gibberish, but the string i want to edit shows up correctly.

wraithdu
Offline
Last seen: 10 years 10 months ago
Developer
Joined: 2007-06-27 20:22
If the string you need to

If the string you need to change is always as the same offset, you could try FileReadByte and FileWriteByte.

digitxp
digitxp's picture
Offline
Last seen: 12 years 7 months ago
Joined: 2007-11-03 18:33
Or

ReplaceInFile, and fileread...
FileRead can be found here: http://www.nullsoft.com/free/nsis/makensis.htm#FindFirst

Insert original signature here with Greasemonkey Script.

Travis Carrico
Offline
Last seen: 15 years 4 months ago
Developer
Joined: 2006-10-22 00:30
.

wraithdu, by the same offset, do you mean the info before the string i want can't change any? not really sure what you meant. honestly i have no idea what's going on in that file; i just know there's a bunch of weird characters and mixed in on about the 4th line there is a folder path that i need to have my script change. what would you do to accomplish this? or can it be done?

wraithdu
Offline
Last seen: 10 years 10 months ago
Developer
Joined: 2007-06-27 20:22
Hmm, ok, I figured out how

Hmm, ok, I figured out how File[Read/Write]Byte works, and it's probably too cumbersome to use. I'd try ReplaceInFile first, as suggested above, and see if that works for you.

Log in or register to post comments