How to prevent unknown laptop login access without password (Using a Simple Script)
Sometimes, you just don’t want anyone else snooping around on your laptop. Sure, passwords are there, but what if you want an extra layer of fun security?
Here’s a small VBScript code you can use to make your laptop shut down automatically if your secret folder isn’t found.
Sounds cool, right? Let’s see how it works...
The Magic Code
Here’s the script with simple comments so you understand it:
Or Dowload it here : Dowload File
How This Works
Set Folder Path
You decide on a secret folder location. Replace "path to folder" with your own folder path.-
FileSystemObject (fso)
The script checks if that secret folder exists on your laptop. -
Wait for 10 seconds
The script pauses for 10 seconds after startup to give the system time to load. -
Shutdown Command
If the folder doesn’t exist, the script immediately runs a shutdown command.
Steps to Use It
-
Open Notepad and copy the code.
-
Save it as security.vbs (make sure the file extension is .vbs).
-
Place the file inside the Startup folder.
-
Press Win + R → type shell:startup → press Enter.
-
Copy your security.vbs file here.
-
-
Create your secret folder in the path you set in the script.
-
Done.
Now, every time someone turns on your laptop, the script will run. If your secret folder is missing (or deleted by someone), the system will shut down before they can log in.
A Friendly Warning ⚠️
Don’t delete or rename your secret folder by mistake, or you’ll lock yourself out too 😅. Always remember the folder path you set in the script.
Also Read
Frequently Asked Questions (FAQ)
Q 1: What if I forget or delete the secret folder?
If you delete or rename the secret folder, your laptop will keep shutting down. To fix it, start your laptop in Safe Mode, remove the security.vbs file from the Startup folder, and then restart.
Q 2: Can this script protect my laptop from hackers?
No . This is more like a fun security trick or prank. Real hackers can bypass it. For serious protection, always use a strong password, encryption, and antivirus.