您的位置:首页 > 其它

两个安装包,如何关联起来,先安装完A包,接着继续安装B包!

2006-08-28 08:57 351 查看
http://community.csdn.net/Expert/topic/4974/4974137.xml?temp=.4198877

'为了使用方便,修改了CreateProcess的声明
Private Declare Function CreateProcess Lib "kernel32" Alias "CreateProcessA" (ByVal lpApplicationName As String, ByVal lpCommandLine As String, ByVal lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, lpEnvironment As Any, ByVal lpCurrentDriectory As String, lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long
Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
Private Type STARTUPINFO
cb As Long
lpReserved As String
lpDesktop As String
lpTitle As String
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Private Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessId As Long
dwThreadId As Long
End Type
Private Const INFINITE = &HFFFF ' Infinite timeout

Private Sub Form_Load()
Dim sui As STARTUPINFO
Dim pi As PROCESS_INFORMATION
sui.cb = Len(sui)
CreateProcess "SETUP_A.EXE", vbNullString, 0&, 0&, 0&, 0&, ByVal 0&, vbNullString, sui, pi
WaitForSingleObject pi.hProcess, INFINITE
Shell "SETUP_B.EXE"
End Sub
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐