Jump to content

Recommended Posts

Posted

It's inconsistent even with the line directly before it!

That said, the RegWrite method in vbscript does not support writing binary data greater than four bytes so perhaps AuitoIt has a similar restriction.

You may also be better advised to use the APPDATA environment variable as opposed to USERPROFILE with \Local Settings\Application Data


Posted

If you are going to use AutoIt, then the variables will not expand within strings unless you set some options to do that. Binary data in AutoIt starts with 0x so it is like 0x3C00...

Here is the correction to your Input and the following RegWrites. The underscores at the end of the lines are continuations characters so the lines do not go off page.

$strHome = InputBox("HOmepage", "Provide your chosen Homepage", "https://www.google.com/")if $strHome == "" then Exit 1RegWrite("HKCU\SOFTWARE\MICROSOFT\INTERNET EXPLORER\MAIN", "START PAGE", "REG_SZ", $strHome)RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections', _	'DefaultConnectionSettings', "REG_BINARY", _	"0x3c000000110000000100000000000000000000000000000001000000000000000000000000000000000000000000000000000000" _)

As for your your use of sed, well, that is not clear to my understanding of what you are doing. AutoIt has got Perl Compatible Regular Expression (PCRE) support built in so perhaps you can use FileRead to read the file and use StringRegExpReplace to do the replacements in the string and then use FileWrite to write to the file with the changes. :)

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...