alias regwrite {
var %a = regwrite $+ $ticks
.comopen %a WScript.Shell if $comerr { return 0 }
if d isin $3 { var %3 = REG_DWORD, %type = ui4 }
elseif b isin $3 { var %3 = REG_BINARY, %type = ui4 }
else { var %3 = REG_SZ, %type = bstr }
if $com(%a,RegWrite,3,bstr,$1,%type,$2,bstr,%3) {
.comclose %a
return 1
}
.comclose %a return 0
}