RKR

Rabi Kishan Rauniyar

@07iamravi
Nepal 18 years UTC+5:45
"Breaking things to make them safer. I automate, audit, and write PoCs. OSCP aspirant."
18
Age
🇳🇵
Nepal
10+
Projects
CTF
Player
Skills & Tools
Python Kali Linux Penetration Testing Offensive Security Automation Bug Bounty Metasploit Wireshark Wifite Subzy PHP Networking Arch Linux Hashcat Nuclei WAF Burp Suite Caido Nmap SQL Injection XSS Android Hacking RAT Java Script C++
Research Projects

PUNY-GEN

Homoglyph generator for security research
Educational

ThisIsNotRat

Remote access PoC for educational labs
Research

x-crypter

Advanced script obfuscation techniques
Educational

x-zone

Social engineering awareness platform
Awareness
Ethical Hacking Only
⚡ Systems I own or have explicit written permission.
All testing in labs/CTFs. Responsible disclosure always. Certified ethical hacker.

Sunday, September 7, 2025

Stop Others from Using Your Laptop: Easy Auto Shutdown Script




Worried about someone sneaking into your laptop when you’re not around? Passwords are great, but sometimes you want an extra layer of protection. In this guide, I’ll show you a simple VBScript auto shutdown trick that will instantly turn off your laptop if a secret folder isn’t found — making it nearly impossible for unauthorized users to access your files.

The Magic Code ✨

Here’s the script with comments so you can understand how it works: Download the script


Option Explicit   ' Force all variables to be declared (good coding practice)

' ============================
' Laptop Auto Shutdown Script
' ============================
' This script adds an extra layer of security to your laptop.
' It checks for the presence of a "secret folder" every time 
' the system starts. If the folder is missing, it will 
' automatically shut down the computer to prevent unauthorized use.
' ============================

' Step 1: Set your secret folder path here (e.g., "C:\Users\admin\Desktop\XYZfoldername")
Dim folderPath
folderPath = "C:\setyourMySecretFolder"

' Step 2: Create FileSystemObject to check if the folder exists
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")

' Step 3: Pause for 10 seconds after startup 
' (change the time as per your need — for example, 1 minute = 60000)
WScript.Sleep 10000

' Step 4: If the secret folder is missing, trigger system shutdown
If Not fso.FolderExists(folderPath) Then
    Dim shell
    Set shell = CreateObject("WScript.Shell")
    shell.Run "shutdown /s /t 1", 0, False   ' Shutdown immediately
End If


How It Works 🛠️

  • Set your folder path: Change C:\MySecretFolder to your own secret folder path.
  • The folder check: The script uses FileSystemObject to see if that folder exists.
  • 10-second delay: Gives your system enough time to start before running the check.
  • Shutdown command: If the folder is missing, the laptop shuts down instantly.

Steps to Use It 💻

  1. Open Notepad and paste the script above. (Step 1 & 2 are optional, if you already downloaded the script, but you need to make some changes like setting your secret folder path and time as per your need!)
  2. Save the file as security.vbs (make sure the extension is .vbs). 
  3. Place it in your Startup folder:
    • Press Win + R, type shell:startup, and hit Enter.
    • Copy your security.vbs file into this folder.
  4. Create the secret folder at the path you set in the script.
  5. You’re done! ✅

Final Thoughts

This trick won’t replace strong passwords or advanced security tools, but it’s a clever way to stop others from using your laptop. The next time someone tries to snoop around and your secret folder isn’t there, your laptop will shut down before they can log in.


⚠️ Friendly Reminder

Be careful not to delete or rename your secret folder — otherwise, you might lock yourself out of your own laptop 😅. Always double-check the folder path you’ve set in the script, and keep it consistent.



07iamravi@blog:~$