Yzöwl Posted March 13, 2014 Share Posted March 13, 2014 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 Link to comment Share on other sites More sharing options...
MHz Posted March 13, 2014 Share Posted March 13, 2014 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now