- 生肖
- 猴
- 星座
- 处女座
- 性别
- 男
- 积分
- 680
- 积分
- 1161
- 精华
- 1
- 阅读权限
- 70
- 注册时间
- 2012-5-3
- 最后登录
- 2016-9-22
- 帖子
- 136
- 生肖
- 猴
- 星座
- 处女座
- 性别
- 男
|
本帖最后由 sky_yx 于 2015-12-30 14:21 编辑
- 此程序功能是把电脑中的应用都锁住不让运行,只让运行杀毒软件、注册表、explorer和本程序。
- 友情提示:此程序具有一定的危险性,请新手不要擅自模仿。如果为此而造成损失,本
- 作者将不承担任何责任。
- 在窗体中:
- '**************************************************************************
- '**模 块 名:限制程序运行 - Form1
- '**说 明:魔灵圣域 版权所有2008 - 2009(C)
- '**创 建 人:郭卫(魔灵)
- '**日 期:2008-04-30 00:33:12
- '**修 改 人:郭卫
- '**日 期:
- '**描 述:郭卫制作
- '*************************************************************************
- Option Explicit
- Private Const HKEY_CURRENT_USER = &H80000001
- Private Const REG_SZ = 1 ' -->字符串
- Private Const REG_DWORD = 4 ' -->长整数
- Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
- Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
- Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long ' Note that if you declare the lpData parameter as String, you must pass it By Value.
- Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
- Private Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long
- Private hKey As Long
- Private Sub Command1_Click()
- '建立禁止运行任何程序
- RegOpenKey HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", hKey
- RegSetValueEx hKey, "RestrictRun", 0, REG_DWORD, 1&, 4
- RegCreateKey HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\RestrictRun", hKey
-
- '建立充许运行的的程序,以下三个键值极为重要,它是为自己留的后门,否则你就重装系统吧
- RegSetValueEx hKey, "Onlyme", 0, REG_SZ, ByVal "Onlyme.exe", LenB(StrConv("Onlyme.exe", vbFromUnicode)) + 1
- RegSetValueEx hKey, "注册表", 0, REG_SZ, ByVal "regedit.exe", LenB(StrConv("regedit.exe", vbFromUnicode)) + 1
- RegSetValueEx hKey, "Explorer", 0, REG_SZ, ByVal "Explorer.exe", LenB(StrConv("Explorer.exe", vbFromUnicode)) + 1
- RegCloseKey hKey
- RebootExplorer
- End Sub
- Private Sub Command2_Click()
- '建立充许运行任何程序
- RegOpenKey HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", hKey
- RegSetValueEx hKey, "RestrictRun", 0, REG_DWORD, 0&, 4
- RegDeleteKey HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\RestrictRun"
- RebootExplorer
- End Sub
复制代码
|
|