| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 545 人关注过本帖
标题:如何取消开机运行?
只看楼主 加入收藏
kofsen
Rank: 1
等 级:新手上路
帖 子:11
专家分:5
注 册:2012-7-18
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:7 
如何取消开机运行?
已经可以自动运行了
Private Sub autorunTrue_Click()
Set autorunT = CreateObject("WScript.Shell")
autorunT.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\" & App.Title, App.Path & "\" & App.EXEName & ".exe", "REG_SZ"
End Sub
如何取消?
我的取消代码如下
Private Sub autorunFalse_Click()
Set autorunF = CreateObject("Wscript.shell")
autorunF.RegDelete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\" & App.Title, App.Path & "\" & App.EXEName & ".exe"      
Set autorunF = Nothing
End Sub
请问代码哪里出错了?谢谢。
搜索更多相关主题的帖子: Software Microsoft Windows 如何 
2012-10-15 16:47
wube
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:23
帖 子:1820
专家分:3681
注 册:2011-3-24
收藏
得分:5 
取消Reg:
RegDeleteValue

Public Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long
Public Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Public Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Public Declare Function RegSetValue Lib "advapi32.dll" Alias "RegSetValueA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal dwType As Long, ByVal lpData As String, ByVal cbData As Long) As Long
Public 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

不要選我當版主
2012-10-16 20:50
wube
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:23
帖 子:1820
专家分:3681
注 册:2011-3-24
收藏
得分:5 
手动:

run -> cmd

key -> regedit

Location -> SOFTWARE\Microsoft\Windows\CurrentVersion\Run

Action -> delete reg data

不要選我當版主
2012-10-16 20:59
Artless
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
等 级:贵宾
威 望:103
帖 子:4211
专家分:28888
注 册:2009-4-8
收藏
得分:10 
autorunF.RegDelete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\" & App.Title

无知
2012-10-17 11:39
kofsen
Rank: 1
等 级:新手上路
帖 子:11
专家分:5
注 册:2012-7-18
收藏
得分:0 
以下是引用Artless在2012-10-17 11:39:46的发言:

autorunF.RegDelete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\" & App.Title
成功~~~谢谢各位版主的帮助。
2012-10-18 08:30
lm5413
Rank: 1
等 级:新手上路
帖 子:8
专家分:7
注 册:2012-10-20
收藏
得分:0 
看到后我瞬间领悟了点什么 但还是不太了解
2012-10-21 11:51
青春无限
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
来 自:江苏
等 级:贵宾
威 望:24
帖 子:3452
专家分:19340
注 册:2012-3-31
收藏
得分:0 
看看


学 会看代码…学习写程序…学会搞开发…我的目标!呵呵是不是说大话啊!!一切皆可能
2012-10-21 12:00
青春无限
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
来 自:江苏
等 级:贵宾
威 望:24
帖 子:3452
专家分:19340
注 册:2012-3-31
收藏
得分:0 


学 会看代码…学习写程序…学会搞开发…我的目标!呵呵是不是说大话啊!!一切皆可能
2012-10-21 12:02
快速回复:如何取消开机运行?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012678 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved