谁能帮我把VB语句转换成VS2012 VB代码?谢谢

2025-03-03 22:15:15
推荐回答(1个)
回答1:

Dim Reg As Microsoft.Win32.RegistryKey
Reg = My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\QQQ.exe")
If Reg IsNot Nothing Then
With Reg.GetValue("Path", "")
If .ToString <> "" AndAlso IO.File.Exists(.ToString) Then
For Each i As Process In Process.GetProcesses
If i.ProcessName = "QQQ.exe" Then i.Kill()
Next
Call Shell(IO.Path.GetDirectoryName(.ToString) & "\UninsHs.exe")
Dim DesktopDirectory As String
DesktopDirectory = System.Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)
DesktopDirectory &= "\QQQ.lnk"
If IO.File.Exists(DesktopDirectory) Then
My.Computer.FileSystem.DeleteFile(DesktopDirectory)
End If
End If
End With
Else
MsgBox("没有安装QQQ.exe!!!")
End If