1. 程式人生 > >windows鎖屏程式,雙擊鎖屏dlock.vbs

windows鎖屏程式,雙擊鎖屏dlock.vbs

----------將下面的程式碼複製儲存為.vbs檔案
Dim WSHShell

Set WSHShell=WScript.CreateObject(“WScript.Shell”)

WSHShell.Run “Rundll32.exe user32.dll,LockWorkStation”, 0

-------------------如果不是專業版windows則可能會出錯
===》解決方案
-----------將下面的程式碼複製儲存為.reg檔案
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT.VBS]
@=“VBSFile”
[HKEY_CLASSES_ROOT\VBSFile]
@=“VBScript File”
[HKEY_CLASSES_ROOT\VBSFile\ScriptEngine]
@=“VBScript”
[HKEY_CLASSES_ROOT\VBSFile\ScriptHostEncode]
@="{85131631-480C-11D2-B1F9-00C04F86C324}"
[HKEY_CLASSES_ROOT\VBSFile\Shell]
@=""
[HKEY_CLASSES_ROOT\VBSFile\Shell\Open]
@=“開啟(&O)”
[HKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,57,00,53,00,
63,00,72,00,69,00,70,00,74,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,00,31,
00,22,00,20,00,25,00,2a,00,00,00
[HKEY_CLASSES_ROOT\VBSFile\ShellEx]
[HKEY_CLASSES_ROOT\VBSFile\ShellEx\DropHandler]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"
[HKEY_CLASSES_ROOT\VBSFile\ShellEx\PropertySheetHandlers]
[HKEY_CLASSES_ROOT\VBSFile\ShellEx\PropertySheetHandlers\WSHProps]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"

----------------------------然後執行這個reg檔案,之後就可以開啟.vbs檔案了