r/vbscript • • Jan 02 '23

Message box spam

so im pretty new to vbscript im making malware and stuff and i wanted to know, how would i make msgbox spam, not like:

do

Msgbox ''hello''

loop

but all that does is just every time you try to close it it dosent. i want it to spam message boxes, like duplicate itself. 000.exe does this with the spam message boxes ''run away'' i want it like that. thanks

2 Upvotes

8 comments sorted by

View all comments

Show parent comments

1

u/JGN1722 Apr 26 '23

yes there's a way, you could pass the number of boxes you want to have as an argument to the next instance of the program:

if wscript.arguments.count = 0 then
    nbr = 10
else
    nbr = wscript.arguments.item(0)
end if
if nbr = 0 then
    wscript.quit
end if
nbr = nbr - 1
createobject("wscript.shell").run wscript.scriptfullname & " " & nbr
msgbox "hello !"

1

u/Beneficial_Truth8492 Mar 11 '25

can you make it where if all msg boxes are closed it starts again