DIM WS
'-------------------------------------------------------------------------------------------------------------
Set WS = WSCRIPT.CREATEOBJECT("WSCRIPT.SHELL")
on error resume next

path1 = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\com.tw\*.rsc\http"
pathread1 = ws.regread (path1)
if pathread1 = 2 Then
	result="YES"
Else
	result = result + "*.rsc.com.tw" + Chr(10)
end if

path2 = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\com.tw\*.rsc\https"
pathread2 = ws.regread (path2)
if pathread2 = 2 then
	result="YES"
else
	result = result + "https://*.rsc.com.tw" + Chr(10)
end if
'msgbox (pathread2)

path3 = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\com.tw\*.rsc\http"
pathread3 = ws.regread (path3)
if pathread3 = 2 then
	result="YES"
else
	result = result + "*.rsc.com.tw" + Chr(10)
end If

path4 = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\com.tw\*.rsc\https"
pathread4 = ws.regread (path4)
if pathread4 = 2 then
	result="YES"
else
result = result + "https://*.rsc.com.tw" + Chr(10)
end If
If Trim(result) = "YES" Then
	MsgBox "您已經將德信網站加入為信任網站，可便利使用本網站",vbOKOnly,"明智的選擇"
Else
	If ( MsgBox ("請將德信加入信任網站，您可便利使用本網站",vbYesNo,"詢問") = vbYes) then
		path5= "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\com.tw"
		path6 = "\*.rsc\"
		ws.RegWrite path5 & path6, "", "REG_SZ"
		ws.RegWrite path5 & path6 & "" ,2,"REG_DWORD"
		ws.RegWrite path5 & path6 & "http" ,2,"REG_DWORD"
		ws.RegWrite path5 & path6 & "https" ,2,"REG_DWORD"
		path7 = "\*.rsc\"
		ws.RegWrite path5 & path7, "", "REG_SZ"
		ws.RegWrite path5 & path7 & "" ,2,"REG_DWORD"
		ws.RegWrite path5 & path7 & "http" ,2,"REG_DWORD"
		ws.RegWrite path5 & path7 & "https" ,2,"REG_DWORD"
		MsgBox "將德信網站加入為信任網站成功!可便利使用本網站!!",vbOKOnly,"明智的選擇"
	Else
		MsgBox "您選擇不將德信加入信任網站，若您遇到元件下載請按[是]",vbOKOnly,"訊息"
	End if
End If
set ws = nothing