Jump to content

Use flash drives or commands to prevent unauthorized access to your computer or copying of your files.


FlyLowrie

Recommended Posts

  Long time no see, I finally had time to post😭.

  In our daily life, we often meet children secretly open their own computers to play games.Or when you leave and forget to lock your computer, someone uses a USB flash drive to copy your important file.Although we will set password or encryption to important files but it is still not safe enough.Here will be introduced two method to solve these problems, and one method requires the use of an application and another method only needs to use the command.

Method one:

USB Shutdown

download link(https://www.trishtech.com/downloads/usb-shutdown.zip)

  Here we will download an application.It will constantly detect the connection of USB devices after the computer is turned on. When we access or unplug USB devices, we can execute a command. We can set this command to shutdown.And this is a portable software, no need to install.It can shut down the computer when someone connects to the USB device without permission.This will prevent others from copying their own documents.

usb-shutdown.jpg

  As the picture, click " Abort Shutdown " You can abort the shutdown.  

  Code explanation:

shutdown /s /f /t20

  The "t" behind represents the time to delay the shutdown. For example, the above command means shutdown after 20 seconds. Of course we can change it to 1.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Method Two:

  We can also use the code to detect the encrypted device in the USB device when it is turned on, and automatically shut down if it is not detected.

  1.Plug in the USB drive and look at its disk character on your computer. My computer is located in the“ F” disk.

  2.Create a file called "haha.txt" on your USB flash drive.The file name can be changed at will.

  3.Open Notepad, enter the following command and then save as " bat " Batch File Formats.

ifnotexist F:\haha.txt shutdown-s-t 8 -c"You can't use a computer"

  This line of code means that there is no "haha.txt" file in the “F” disk (USB flash drive, turn off the computer after 8 seconds and displays "You cannot use a computer".

  4.Next, open the local group policy editor.

gpedit.msc

Open the following path.

Local Computer Policy 、 Computer Configuration 、 Windows Settings 、 Scripts (start / shutdown) 、 start

  5.Pull in batch files will be completed.

Life learning in school is really tired, but as long as I go back to the forum, I can feel the long-lost happiness.đŸ€Ș

Link to comment
Share on other sites


  • Views 959
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...