Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Replace text in a REG file.

$
0
0
I am quite familiar with this well-known replace text solution:

[ autoit ]      
$szText = FileRead($szFile,FileGetSize($szFile)) $szText = StringReplace($szText, "replace me", "with me") FileDelete($szFile) FileWrite($szFile,$szText)

Problem is, when I apply it to a REG file, it does not reconstruct the file correctly. I'm gonna have to include a screenshot for this one:

Posted Image
To the left is original, to the right - reconstructed. How would I edit the file maintaining its format?

P.S. Pardon me for the big image, I am not yet sure what is the hide tag in the forum.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>