两个安装包,如何关联起来,先安装完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
'为了使用方便,修改了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
相关文章推荐
- MySQL同一台机器安装两个服务,如何安装两个mysql数据库服务,用mysql的zip安装包
- 两个不同数据库之间的两个表如何关联起来查询数据
- MySQL同一台机器安装两个服务,如何安装两个mysql数据库服务,用mysql的zip安装包
- 如何用Eclipse将两个有Dependency的Maven Project关联起来
- 两个不同数据库之间的两个表如何关联起来查询数据
- 两个不同数据库之间的两个表如何关联起来查询数据
- 如何在一台机器上安装两个甚至多个版本的EAS服务器?
- 如何在项目部署的时候自动安装多个应用程序安装包(VC++6.0)
- 安装两个硬盘时应如何跳线?
- NSIS 安装完毕后如何刷新文件关联
- 我有两个路由器需要串起来使用,该如何设置? (zz)
- Installshield关于.NET安装时需要重启动的处理办法,以及延伸出的重启后继续安装的安装包的一点想法
- windows下如何在一台机器上安装两个MYSQL数据库(好)
- 如何让两个文件的两个类相互关联
- android开发中,xml如何与.java文件关联起来的呢?
- InstallShield安装包制作笔记:如何修改安装语言选项
- Android学习 - 小知识(读取一个已经安装的包的权限与两个Activity跳转的时,如何自定义翻页效果)
- INFO:InstallShield多语言安装包中如何获取用户选择的安装语言
- 如何安装两个tomcat,如何配置
- windows下如何在一台机器上安装两个MYSQL数据库