Dear,

First we are reading the current value and we are testing "contains this string the MSN value".
We are only using MSN as search key, because it is possible that microsoft is changing the URL
link but mostly MSN will stay an element of any new format.
Secondly we replace it with the defined starting page, when not find.

code:
$start_page="http://www.google.com"
;
IF (Instr("msn",ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page")) <> 0)
IF WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page", $start_page, "REG_SZ") <> 0)
? "Warning KIX: error status @error (@serror)"
ENDIF
ELSE
? "HKCU value "+ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page")
ENDIF
;
IF (Instr("msn",ReadValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main", "Start Page")) <> 0)
IF WriteValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main", "Start Page", $start_page, "REG_SZ") <> 0)
? "Warning KIX: error status @error (@serror)"
ENDIF
ELSE
? "HKLM value "+ReadValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main", "Start Page")
ENDIF

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA