Make Windows system more secure? Use VBS script

  

VBS script is a strange term for many people, but today Xiaobian will explain the magical use of this strange noun in system security. Many Professionals understand that scripts written in VBS are interpreted by the wscript.exe file in the window interface, and interpreted in the character interface by the cscript.exe file. Wscript.exe is a scripting language interpreter that allows scripts to be executed just like batch processing.

1. Unlock the Registry Editor

Edit the following with Notepad:

DIM WSH

SET WSH=WSCRIPT.CreateObject(" WSCRIPT.SHELL") 'Behavior WScript.Shell object

WSH.POPUP("Unlock Registry Editor!")

'Show pop-up information“Unlock Registry Editor !”

1. WSH.Regwrite"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\

DisableRegistryTools",0,"REG_DWORD"

'Unlock Registry Editor

WSH.POPUP("Registry Unlocked Successfully!")

'Show pop-up message“ Registry unlocked successfully!”

Save as a file with a .vbs extension and double-click it when you use it.

Second, close the default share of Win NT/2000

Edit the following with Notepad:

Dim WSHShell 'define variable

set WSHShell=CreateObject ("WScript.shell") 'Create an object that can communicate with the operating system WSHShell

Dim fso,dc

Set fso=CreateObject("Scripting.FileSystemObject")'Create a file System Objects

set dc=fso.Drives 'Get all drive letters

For Each d in dc

Dim str

WSHShell.run(" ;net share"&d.driveletter &"$ /delete")'Close hidden share for all drives

next

WSHShell.run("net share admin$ /delete" ;)

WSHShell.run("net share ipc$ /delete")'Close admin$ and ipc$pipeshare

Now let's test, first open cmd.exe, enter net The share command will see the share on your machine. After double-clicking execute stopshare.vbs, you will see the window flashing past. Then enter the net share command in cmd. At this time, the shared list is not found.

1. New Roman">

3. Display the local IP address

Many times, we need to know the IP address of this machine. Although we can use various software, it is very convenient to use VBS script. Use Notepad to edit the following:

1. Dim WS

2. Set WS=CreateObject("MSWinsock.Winsock")

3. IPAddress=WS.LocalIP

4. MsgBox "Local IP=" & IPAddress

Save the above content as ShowIP.vbs and double-click to get the local IP address. Previous12Next page Total 2 pages

Copyright © Windows knowledge All Rights Reserved