This problem arises when the user selects a digit separator that is not a dot (.), like a comma (,) as seen in French, Swiss and other European locales.

To make my scripts bullet proof for these non-dot separators, I had to:

1. Convert to double by using divisions, e.g. 6.1 = 61/10:
 Code:
$windows_7_plus = cdbl(61) / 10
if cdbl(readvalue("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CurrentVersion")) >= $windows_7_plus
	;Windows 7 and 2008R2+.
endif


2. Use this function to convert a double to a string:
 Code:
function cdbl_to_string($cdbl, optional $decimals)
	;Convert and round a double-precision floating-point value (cdbl) to a string with a dot (.) as numerical separator.
	dim $index, $digit, $string, $decimal_set
	$cdbl = round($cdbl, $decimals)
	if $decimals > 0
		$decimal_set = 0
	else
		$decimal_set = 1
	endif
	$string = cstr($cdbl)
	;Replace any kind of separator (e.g. comma) with a dot (.).
	for $index = len($string) to 1 step -1
		dim $digit_ascii, $new_digit
		$digit = substr($string, $index, 1)
		$digit_ascii  = asc(substr($string, $index, 1))
		if ($digit_ascii < 48 or $digit_ascii > 57)
			if $decimal_set = 0
				$new_digit = "."
				$decimal_set = 1
			endif
		else
			$new_digit = $digit
		endif
		$cdbl_to_string = $new_digit + $cdbl_to_string
	next
	if $decimals > 0 and $decimal_set = 0
		$cdbl_to_string = $cdbl_to_string + ".0"
	endif
endfunction