部署vb.2003应用程序使用户安装本程序后,一开机就运行本程序.
请高手指点
谢谢.
命名空间输入代码
Imports Microsoft.Win32
Imports System.Diagnostics.Process
load事件下输入代码
Dim mtprocess() As Process
Dim thisprocess As Process
mtprocess = Process.GetProcesses
For Each thisprocess In mtprocess
Try
If thisprocess.ProcessName = "输入工程名称" Then
Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\Install\Software\Microsoft\Windows\Current\run", "输入工程名称", thisprocess.Modules(0).FileName)
exit sub
End If
Catch ex As Exception
End Try
Next
End Sub
End Class
[此贴子已经被作者于2007-8-2 15:11:49编辑过]