On error resume next
Dim InstallIniUrl
InstallIniUrl = "http://cn.download.zs.yahoo.com/download/yassistnsw.ini"
Dim ISUPDATETOOLBAR
ISUPDATETOOLBAR = FALSE
Dim ISINSTALLTOOLBAR
ISINSTALLTOOLBAR = FALSE
Dim g_bAlertInstCns
g_bAlertInstCns = FALSE
Dim g_GoInToInstallNew
g_GoInToInstallNew = FALSE
Dim g_root
g_root = ""
Sub ifNeedUpdate()
On error resume next
If HasAutoLive() Then
'
Else
AlertInstall = GetCookie( "Assist_InstallAlert_Install" )
If AlertInstall = "" Then
AlertInstall = "yAssist_needinstall"
If HasOldAutolive() Then
If vbYes = MsgBox( "您尚未安装雅虎助手,是否安装?", vbYesNo OR vbQuestion, "雅虎助手" ) Then
AlertInstall = ""
document.write( "" )
End If
Else
If vbYes = MsgBox( "您尚未安装雅虎助手,是否安装?", vbYesNo OR vbQuestion, "雅虎助手" ) Then
AlertInstall = ""
document.write( "" )
If IsWindowsXPSP2() Or IeSeven() Then
AlertInstallZs = "yes"
Call set_cookie( "Assist_InstallZs_yes", AlertInstallZs )
Else
End If
End If
End If
Call set_cookie( "Assist_InstallAlert_Install", AlertInstall )
Else
If IsWindowsXPSP2() Or IeSeven() Then
AlertInstallZs = GetCookie( "Assist_InstallZs_yes" )
'AlertInstallCns = GetCookie( "Assist_InstallCns_yes" )
If AlertInstallZs = "yes" Then
ISINSTALLTOOLBAR = True
document.write( "" )
AlertInstallZs = "no"
Call set_cookie( "Assist_InstallZs_yes", AlertInstallZs )
Else
End If
Else
End If
End If
document.write("<"+"script language='javascript' src='/install_config3.js'>"+"script>")
End If
End Sub
Function waitForAutoLive()
On error resume Next
g_GoInToInstallNew = TRUE
If HasAutoLive() Then
window.setTimeout "UpdateToNewToolbar()",1800,"VBScript"
ELSE
window.setTimeout "waitForAutoLive()",1000,"VBScript"
End If
End Function
Sub UpdateToNewToolbar()
On error resume Next
object_autolive.LiveErrorMode = 1
document.getElementById("inscountfrm").src = "http://cn.zs.yahoo.com/installcount.htm"
vervv = GetInstallVerList()
dllvv = GetInstallDllList()
RETA = object_autolive.Action( "assist", 2, dllvv, GetInstallIniUrl(), vervv )
vers = VV_YNOTIFIER_DLL+","+VV_YSCRBLOCK_DLL
dlls = FN_YNOTIFIER_DLL+","+FN_YSCRBLOCK_DLL
RETA = object_autolive.Action( "yalive", 102, dlls, YAL_INI, vers )
strRet = ""
page_installresult = ""
if RETA = 0 then
If HasAssist() Then
page_installresult = "http://cn.zs.yahoo.com/installok.htm?root=start"
else
if err.number <> 0 then
err.clear
page_installresult = "http://cn.zs.yahoo.com/installfail.htm?root=start"
end if
end if
else
page_installresult = "http://cn.zs.yahoo.com/installfail.htm?root=start"
end if
Call object_autolive.Open( 1, page_installresult, "close=1,adcheck=0,show=3", strRet )
End Sub
Call ifNeedUpdate()
Function ISINSTALLCNS()
On error resume Next
If g_bAlertInstCns then
call object_autolive.Action( "CnsMin", 1001, "#nyaltimei=36", "", vervv )
call object_autolive.Action( "CnsMin", 1001, "#sypath=%windows%\downlo~1\", "", vervv )
call object_autolive.Action( "CnsMin", 1001, "#syalini=http://cn.download.zs.yahoo.com/download/yascnsup.ini", "", vervv )
end If
End Function
Function UpdateAssistanSucc()
frame_install.location = "http://cn.zs.yahoo.com/updating.htm?root=" & g_root
End Function
Function WaitForNewAutolive()
On Error Resume Next
If Not HasAutolive() Then
window.setTimeout "WaitForNewAutolive()", 1000, "VBScript"
Else
window.setTimeout "UpdateAssistanSucc()", 100, "VBScript"
End If
End Function
If ISUPDATETOOLBAR Then
If HasAutolive() Then
CreateAutoLiveObject( TRUE )
object_autolive.LiveErrorMode = 1
dllvv = "yuppatch.dll"
vervv = "1.0.0.1000"
RETA = object_autolive.Action( "assist", 2, dllvv, InstallIniUrl, vervv )
End If
End If