tailieunhanh - Một số thủ thuật lập trình với ngôn ngữ Vbscript

Chúng ta copy code sau đây ở Notepad và lưu nó dưới đuôi là vbs Chẳng hạn như vb xoá prefetch save với tên là xoa . | Một số thủ thuật lập trình với ngôn ngữ Vbscript Chúng ta copy code sau đây ở Notepad và lưu nó dưới đuôi là vbs Chẳng hạn như vb xoá prefetch save với tên là xoa VB Xoá prefetch để tăng tốc CPU Dim fso Set fso = Createobject("") Dim MyVar MyVar = MsgBox ("ban co muon xoa cac muc rac co trong prefetch khong ( de tang toc CPU )?", 0, "Xoa Prefetch (tran thang long)") ("C:\WINDOWS\Prefetch\*.*") VB xem ngày,giờ,tháng,năm,quý . On Error Resume Next strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = ("Select * from Win32_UTCTime") For Each objItem in colItems "ngay: " & "ngay trong tuan: " & "gio: " & "phut: " & "thang: " & "quy: " & "giay: " & "tuan trong thang: " & "nam: " & "het roi" Next VB ẩn hiện chức năng foder option Option Explicit Dim WSHShell, n, MyBox, p, p1, Title911, errnum, vers, itemtype Set WSHShell = ("") p = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\" p1 = "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\" p = p & "NoFolderOptions" p1 = p1 & "NoFolderOptions" itemtype = "REG_DWORD" Title911 = " Tran Thang Long" On Error Resume Next n = (p) On Error Goto 0 errnum = if errnum 0 then p, 0, itemtype p1, 0, itemtype End If If n = 0 Then n = 1 p, n, itemtype p1, n, itemtype Mybox = MsgBox("Folder Options cua ban da bi AN ,xin thanh that chia buon voi ban( chu y: log off lai de co ket qua.)", 4096, Title911) ElseIf n = 1 then n = 0 p, n, itemtype p1, n, itemtype Mybox = MsgBox("Chuc nang foder option da duoc mo (chu y: log off lai de co ket qua.)", 4096, Title911) ", 4096, Title911) End If VB khoá mở registry Option Explicit Dim WSHShell, n, MyBox, p, Titletan_co, errnum, vers, itemtype Set WSHShell = ("") p = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\" p = p & "DisableRegistryTools" itemtype = "REG_DWORD" Titletan_co = "tran thang long" On Error Resume Next n = (p) On Error Goto 0 errnum = if errnum 0 then p, 0, itemtype End If If n = 0 Then n = 1 p, n, itemtype Mybox = MsgBox("registry cua ban da KHOA {~_~}' ", 4096, Titletan_co) ElseIf n = 1 then n = 0 p, n, itemtype Mybox = MsgBox("Registry da MO {=+0+=}", 4096, Titletan_co) End If Xem dung lượng của ổ Option Explicit MsgBox RunOutput( "COMMAND /C DIR chọn ổ:\", 0 ) Function RunOutput( cProgram, nWindowType ) Dim oFS Set oFS = CreateObject("") Dim cFile cFile = (2).Path & "\" & Dim oShell Set oShell = CreateObject( "" ) cProgram & " >" & cFile, nWindowType, True Set oShell = Nothing Dim oFile Set oFile = (cFile, 1, True) RunOutput = () cFile End Function Chúc các bạn thành công!

TỪ KHÓA LIÊN QUAN