Hi all,
What I wish to do is open up dhcpcsvc.dll (or a copy off it since it may be locked), search for "MSFT 5.0" and replace it with another 8 byte string. _ReplaceStringInFile can't seem to handle the big binary blob, is there a straight forward way to do this task in Autoit? The HEX equivalent to "MSFT 5.0" is 4d53465420352e30. Can I search for it and replace it in some way? Thanks.
Hi,
String play to replace the 8 byte string, then write it to a new file..
Here's a crude no error checking example.. $sInFile = @SystemDir & "\dhcpcsvc.dll" ; Original in file
$sFind = "4D53465420352E30" ; MSFT 5.0 Original hex to find
$sReplace = "534D4153484C5921" ; SMASHLY! New hex to replace
$sOutFile = @ScriptDir & "\New_dhcpcsvc.dll" ; New edited out file
_BinaryReplace($sInFile, $sFind, $sReplace, $sOutFile)
Func _BinaryReplace($sInFile, $sFind, $sReplace, $sOutFile)
Loc