Vbs script for multi-process Voting

Source: Internet
Author: User

CopyCodeThe Code is as follows: Set shell = Createobject ("wscript. Shell ")
Set HTTP = Createobject ("Microsoft. XMLHTTP ")

'Obtain the number of "wscript.exe" Processes
A = 0
For each PS in GetObject ("winmgmts: \. \ Root \ cimv2: win32_process"). Instances _
If ps. Name = "wscript.exe" Then a = a + 1
Next

If a <= 5 then' is the default five processes. If less than five processes exist, run one of them.
Shell. Run "wscript.exe" "& wscript. scriptfullname &""""
Else 'Sixth ticket not used to exitProgram
Msgbox "exit the program according to OK! "," Multi-process ticket flushing machine -- by Qiji City"
Shell. Run "taskkill/f/IM wscript.exe", 0
Wscript. Quit
End if

'Start ticket Flushing
Do
HTTP. Open "Post", "http: // ***/lookover. php? R1 = 2 ", false
HTTP. Send
Loop

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.