Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
VB.net检查程序是否处于启动状态?_Vb.net - Fatal编程技术网

VB.net检查程序是否处于启动状态?

VB.net检查程序是否处于启动状态?,vb.net,Vb.net,所以我有这个密码 My.Computer.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True).DeleteValue("WooW") 但在我执行代码之前,我想看看程序/密钥是否处于启动状态 有人能帮我吗?请将子项用作RegistryKey=Registry.CurrentUser.OpenSubKey(“SOFTWARE\Microsoft\Windows\Current

所以我有这个密码

 My.Computer.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True).DeleteValue("WooW")
但在我执行代码之前,我想看看程序/密钥是否处于启动状态 有人能帮我吗?请将子项用作RegistryKey=Registry.CurrentUser.OpenSubKey(“SOFTWARE\Microsoft\Windows\CurrentVersion\Run”,True),使用
Using subKey As RegistryKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
    If subKey.GetValue("WooW") <> Nothing Then
        subKey.DeleteValue("Woow")
    End If
End Using
如果subKey.GetValue(“WooW”)为空,则 子键。删除值(“Woow”) 如果结束 终端使用
如果一个值不存在,则GetValue()函数将产生Null,在Visual Basic中使用Nothing表示。如果需要,可以将第二个参数传递给DeleteValue(),如果该值不存在,该参数将导致函数抛出

那么你的问题是如何检查注册表项?我想检查注册表项是否打开/启用,如果它已启用/启用,那么我想禁用它。你想知道如何在注册表中查找值,对吗?我想检查启动值是否存在/如果启动值/程序已启用,如果打开/启用,我想禁用未设置为对象实例的itError
对象引用。
打开
如果subKey.GetValue(“Woow”)没有任何内容,则
。这是因为Caster错误地拼写了“Microsoft”一词。我更正了,你现在可以检查了。我知道太晚了。。。