VBScript determines whether the client needs to download the control

Source: Internet
Author: User
VBScript determines whether the client needs to download the control:

<Script language = "VBScript">

Sub windo (IP, port, loginname, pass, contact, initiator)

Dim websetupobj2

On Error resume next

Set websetupobj2 = Createobject ("webstarter. webengine2 ") 

 

If websetupobj2 is nothing then

Dim websetupobj

On Error resume next

 Set websetupobj = Createobject ("webstarter. webengine ")

 If websetupobj is nothing then

 If msgbox ("No client is installed locally. ClickOKAnd then download it automatically!", Vbyesno," 8Minute Video") = Vbyes then

Window. Open ("To downloadProgramAddress and program name")

End if

Else

If msgbox ("The client has undergone major changes. To continue, you must reinstall the client. Do you want to download and install the client?", Vbyesno," 8Minute Video") = Vbyes then

Window. Open ("Address and name of the program to be downloaded")

End if

End if

Set websetupobj = nothing

Else

 Websetupobj2.addupdateparam"ServerIP ","Port","/Messenger /"

Websetupobj2.updatefileversion "videochat.exe", "1.0.0.20"

Websetupobj2.updatefileversion "a.wav", "nover"

If websetupobj2.startupdate then

Websetupobj2.addserverparam IP, Port

Websetupobj2.adduserparamLoginname, pass, contact, initiator

Websetupobj2.startexe "videochat.exe"

Else

If msgbox ("Failed to upgrade program. ClickOKAnd then download again!", Vbyesno," 8Minute Video") = Vbyes then

Window. Open ("Address and name of the program to be downloaded")

End if

End if

End if

Set websetupobj2 = nothing

End sub

</SCRIPT>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.