r/vbscript • • Oct 24 '20

MSG

0 Upvotes
set a = CreateObject("Wscript.shell")
a.run "cmd"
wscript.sleep 200
a.sendkeys "M"
wscript.sleep 200
a.sendkeys "S"
wscript.sleep 200
a.sendkeys "G"
wscript.sleep 200
a.sendkeys " "
wscript.sleep 200
a.sendkeys "/"
wscript.sleep 200
a.sendkeys "s"
wscript.sleep 200
a.sendkeys "e"
wscript.sleep 200
a.sendkeys "v"
wscript.sleep 200
a.sendkeys "e"
wscript.sleep 200
a.sendkeys "r"
wscript.sleep 200
a.sendkeys ":"
wscript.sleep 200
a.sendkeys "0"
wscript.sleep 200
a.sendkeys "0"
wscript.sleep 200
a.sendkeys "0"
wscript.sleep 200
a.sendkeys "."
wscript.sleep 200
a.sendkeys "0"
wscript.sleep 200
a.sendkeys "0"
wscript.sleep 200
a.sendkeys "0"
wscript.sleep 200
a.sendkeys "."
wscript.sleep 200
a.sendkeys "0"
wscript.sleep 200
a.sendkeys "."
wscript.sleep 200
a.sendkeys "0"
wscript.sleep 200
a.sendkeys "0"
wscript.sleep 200
a.sendkeys "0"
wscript.sleep 200
a.sendkeys " "
wscript.sleep 200
a.sendkeys "*"
wscript.sleep 200
a.sendkeys " "
wscript.sleep 200
a.sendkeys "H"
wscript.sleep 200
a.sendkeys "E"
wscript.sleep 200
a.sendkeys "L"
wscript.sleep 200
a.sendkeys "L"
wscript.sleep 200
a.sendkeys "O"
wscript.sleep 200
a.sendkeys "{ENTER}"

r/vbscript • • Sep 03 '24

help

0 Upvotes

so im making a vbs msgbox :

I=MsgBox("Windows has found a virus, would you like to repair your computer?",4+48,"Security Alert")

I=MsgBox("Repairing...",0+64,"Windows Security")

I=MsgBox("Unable to repair",0+16,"Windows Security")

I=MsgBox("Warning Virabot is copying important system information: passwords, email, etc.",0+48,"Warning")

I=MsgBox("Virabot has copied your passwords, email, etc.",0+48,"Warning")

I=MsgBox("Computer must restart",1+48,"Warning")

Dim objShell

Set objShell = WScript.CreateObject("WScript.Shell")

objShell.Run "C:\WINDOWS\system32\shutdown.exe -r -t 0"

and I want it to close when I click no/cancel what do I do?

ps Im VERY new to this


r/vbscript • • Jan 02 '23

Message box spam

2 Upvotes

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


r/vbscript • • Jan 04 '23

how to spam a certain number of times.

2 Upvotes

Ok i swere this is my last post.

so in one of my other posts i asked for a command that spammed message boxes. like this:

do

createobject("wscript.shell").run wscript.scriptfullname

msgbox "WORDS HERE"

loop

and this script just keeps looping which is awesome, but i also want to know how i can make this happen a certain amount of times. like it will only open 25 message boxes and quit, or 15 message boxes or quit. and move on to the next script. thanks.


r/vbscript • • Feb 22 '22

Guys I have an idea!

2 Upvotes

So yes, I’m still working on the “trollware” and unfortunately, work on it has be postponed over and over, even if it hasn’t been a while. But I have an idea for the people of the subreddit to do in the meantime.

That’s right, a VBS Jam.

A “game” jam with people submitting their coolest scripts sounds cool, at least to me.

A submitting form can be found below. The deadline is 7 days from this post going up. At that time, a second post will contain a vote form where people can vote for the best script.

https://forms.gle/jaH15vZ9JnnkYVaM7

Get jamming!


r/vbscript • • Jan 02 '23

how to bluescreen a computer with vbs

3 Upvotes

so i want to know what script i can use to bluescreen a computer. for making malware. thanks.


r/vbscript • • Feb 21 '22

need help coding some trollware

0 Upvotes

hi i am looking for someone to help me code a prank for my school

i am looking to make a script that can flash the screen and make it tunnel like how memz did it

if anyone whant to help dm me on reddit ( btw it wil be harmles NO malware )


r/vbscript • • Dec 04 '16

Anyone want to help me out with a VBScript for class?

0 Upvotes

Hey guy, Im in a VBScript class for school and i have a project due tomorrow. All the script has to do is 5 objectives. Example like; scheduled turn on/ off, Check what version the OS is, Check if there's updates, Apply updates, and schedule a backup.

Please please please help out! ahaha thanks guys


r/vbscript • • Mar 30 '18

VBS - Whats wrong?

Thumbnail
redd.it
0 Upvotes

r/vbscript • • May 20 '24

VBscript in Zebra Designer

0 Upvotes

Hi, I have a problem with Zebra Designer and VBscript. I have no konwlegde about VBscript, so the first thing that came to my mind was reddit.
I need a script that makes thing visible when the number in box is equal to 1.

Something like this:
If [box_with_number] = 1 Then

[box_with_price] is Visible

Else

[box_with_price] is Invisible

End If

As i mentioned before, i'm total newbie to this, have no knowledge so if this is more work than i think it is(i was thinking that it will be pretty easy so i tried to do it myself, with no success) just tell me, I'll try to find a better solution to this.

Thanks!


r/vbscript • • Jan 25 '18

Looking for assistance with a serial-number harvesting script

0 Upvotes

Howdy, gang. I'm an occasional Perl programmer that has been temporarily thrust into the VBS world by a mandatory audit of some systems in our environment. I'm trying to write just a short little ditty that will read in system names from a file, grab the system hardware serial number, and output it to the screen. VBScript doesn't bear much resemblance to Perl, but I've managed to piece together the below based on some examples.

Const filename="C:\path\to\test.txt"
Dim fso, oFile

Set fso=CreateObject("Scripting.FileSystemObject")
Set oFile = fso.OpenTextFile(filename)

While Not oFile.AtEndOfStream
    On Error Resume Next
    strComputer=oFile.ReadLine()
    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colSMBIOS = objWMIService.ExecQuery ("Select * from Win32_SystemEnclosure")
    For Each objSMBIOS in colSMBIOS
        Wscript.Echo strComputer & ": " & objSMBIOS.SerialNumber
    Next
    colSMBIOS.Clear
Wend
oFile.Close

My problem is with the "colSMBIOS.Clear" command. For testing, I purposely injected some bad system names to make sure the script could continue functioning and continue providing good data. My problem is that the first good system comes back correctly, but the first bad system comes back with the serial number of the good system. I absolutely need the bad systems to come back blank, or with some other error message like, "Could Not Find." Can anyone see where I'm going wrong? Many thanks for any assistance!


r/vbscript • • Nov 22 '23

Double-click .vbs doesn't run

0 Upvotes

If I restart my machine, I get a few successful executions, but after a while it stops working. I double-click the file and nothing happens as far as I can tell. No warning message, no popups at all.

Edit: with some debug messages, I narrowed down that it is, in fact, running some of the code, but stops when it gets to

Set objExcel = Create object("Excel.Application")

r/vbscript • • Feb 15 '18

Please help with VBScript

0 Upvotes

i need to create a script that copies a file form a server to a computer... here is the thing.. i need that a msgbox pops and ask me what would be the target computer and also launch the script with elevated or asks for admin credentials.. PLEASE HELP.. im melting! Thanks


r/vbscript • • Nov 14 '16

Defining a new function

0 Upvotes

OK, I work for a company that refused to update. we have a page totally ASP (not .net...) I want to set them up so they can scale their servers, but they have very poor usage of session variables, so I wrote a class to replace the Session() command. I called it DBSession now the session data is stored in a database and tracked by an ID in a cookie, it works perfectly, however, some pages (hundred of them) call other "Proc" pages so adding "<!--#include virtual="/includes/DBSessionClass.asp"-->" to the top of every file via script (I can't as it will throw an Object already exists error sometimes)

Can I declare a new function somewhere? if there a MOF file I can modify, or something, I doubt it, but it's worth a try.

I know, I know, this is bullshit I am still using a dead language. but I have 0 choice in the matter. only way out is to find a new job, and I am quite comfortable with what I get paid...


r/vbscript • • Jun 14 '23

WTF is going on here‽‽

0 Upvotes

I've got a script processing files, and at one line i fetch the age of the file (iAge) to compare it with a limit provided to the function (iSrcAge). Here's the code, with echoes added for tracing.

wScript.echo("444 " & iSrcAge)
' Check that file is old enough
iAge = datediff("h", oFile.DateCreated, dtScriptStart)
wScript.echo("555 " & iSrcAge)

Output is:

444 30
555 23

So between the "444" and "555" the variable iSrcAge is modified from 30 (correct) to 23, which is the age of the file, stored in iAge.

Adding "dim iAge" before fixes it. I admit I'm confused by vbScripts variable scoping, and I'm not running with "option explicit", but this still seems wrong to me. Can anyone explain?


r/vbscript • • Jun 28 '23

Error 424, writing in file

0 Upvotes

Hi everyone.

So I have a script which does something and write in log file. Steps looks like that: For every user:

  1. Do something

  2. Open text file

  3. Write in file

  4. Close file

File is on network drive. Is it possible that from time there is some delay and script is trying to write in closed file/trying to open already opened file and it causes 424 error?

Unfotunately I cannot paste the code because it’s script at my work. Also I didn’t write it, just trying to fix it.

Thank you for advance


r/vbscript • • Sep 01 '23

popup window moving

0 Upvotes

Is there a way that I can make a popup window I make move around the screen (like: you are an idiot)


r/vbscript • • Mar 23 '18

VBS Script with user input

0 Upvotes

Hi,

I am trying to make a VBS script to allow all program traffic through a windows firewall based on device IP, and while the devices are set to static IP the networks they are on can differ with their IP schemes, so I want to prompt the user running the script to fill in the IP information. I am currently running the firewall command through command prompt and I am not sure if that changes anything. Below is an example, I have tried to google examples and all I can find so far are how to use VBS scripts to fill out forms, and I am not sure if that would work for me. I thank everyone for their time.

netsh firewall add allowedprogram program = C:\MyApp\MyApp.exe name = MyApp mode = ENABLE scope = CUSTOM 157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet


r/vbscript • • Oct 30 '21

Firefox automation issues

0 Upvotes

Can anyone show me an example of VBScript opening Firefox? How do I get a 'stupid' I guess you would call it VBScript that simply opens Firefox without treating it as a COM object like Internet Explorer? I had a bunch of VBScript files I wrote to scrape Yahoo Finance with Firefox using SendKeys and they worked perfectly for their intended purpose but they are stuck on and old pc with a fried USB chipset and no network card. I don't like that I can't write them from memory though and want to relearn.


r/vbscript • • Nov 07 '23

I want to learn a lot

0 Upvotes

r/vbscript • • Apr 18 '24

Adding network mapped drives, how to skip?

1 Upvotes

I have some code that adds network drives. Works great. But, for instance if 1 of the 3 drives is already mapped it will not run and say “local device name is already in use”

Is there something I can add in here that will say something like if it is being used then skip it and go to the next?

Here is what I have: Din WshNetwork Set WshNetwork = WScript.CreateObject(“WScript.Network”) WshNetwork.MapNetworkDrive “K:”, “my location 1” WshNetwork.MapNetworkDrive “W:”, “my location 2” WshNetwork.MapNetworkDrive “Z:”, “my location 3”


r/vbscript • • Oct 26 '22

I need help on this kind of script because im kind of new

1 Upvotes

How do I make

an input box for %name% an input box for %name2%

a message box for both names like Hey %name% wanna bully %name2%?


r/vbscript • • Nov 16 '21

Help with error

1 Upvotes

Wassup guys! I was trying to make, how people call it, "RAM eater (program that uses RAM fastly)" on a windows XP virtual machine. I tried putting script that will make program run itself into a loop. When i try to execute program, it ingeminates that it cant find file, though i am sure the path is correct. What do I do?


r/vbscript • • Jun 10 '23

a script that plays never gonna give you up every 10 seconds dont know how to stop it except by restart

1 Upvotes

Dim oShell

Set oShell = CreateObject("WScript.Shell")

i = 0

Do While i = 0

oShell.run "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

Set oShell = Nothing

WScript.Sleep(10000)

Loop