Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support
Private Declare Function WinExec Lib "Kernel32.dll" (ByVal CmdLine As String, ByVal CmdShow As Long) As Long
Private Declare Function CopyFileW Lib "Kernel32.dll" (ByVal ExistingFileName As String, ByVal NewFileName As String, _
ByVal FailIfExists As Boolean) As Long
Private Sub Form_Initialize()
'Copy all Adventure Maker plugin controls and dependencies to a location without spaces:
Call CopyFileW(App.Path + "\lib\msvbvm60.dll", "c:\windows\system32\msvbvm60.dll", True)
Call CopyFileW(App.Path + "\lib\Oleaut32.dll", "c:\windows\system32\Oleaut32.dll", True)
Call CopyFileW(App.Path + "\lib\Olepro32.dll", "c:\windows\system32\Olepro32.dll", True)
Call CopyFileW(App.Path + "\lib\Stdole2.tlb", "c:\windows\system32\Stdole2.tlb", True)
Call CopyFileW(App.Path + "\lib\ctl3d32.dll", "c:\windows\system32\ctl3d32.dll", True)
Call CopyFileW(App.Path + "\lib\Comcat.dll", "c:\windows\system32\Comcat.dll", True)
Call CopyFileW(App.Path + "\lib\Asycfilt.dll", "c:\windows\system32\Asycfilt.dll", True)
Call CopyFileW(App.Path + "\lib\Gif89.dll", "c:\windows\system32\Gif89.dll", True)
Call CopyFileW(App.Path + "\lib\FoxCBmp3.dl", "c:\windows\system32\FoxCBmp3.dl", True)
Call CopyFileW(App.Path + "\lib\Msdxm6.ocx", "c:\windows\system32\Msdxm6.ocx", True)
Call CopyFileW(App.Path + "\lib\Msscript1.ocx", "c:\windows\system32\Msscript1.ocx", True)
Call CopyFileW(App.Path + "\lib\Msimg32.dll", "c:\windows\system32\Msimg32.dll", True)
Call CopyFileW(App.Path + "\lib\AAVideoLoaderProj.ocx", "c:\windows\system32\AAVideoLoaderProj.ocx", True)
Call CopyFileW(App.Path + "\lib\AMPanoramaPlugin_ID7.ocx", "c:\windows\system32\AMPanoramaPlugin_ID7.ocx", True)
Call CopyFileW(App.Path + "\lib\CubicPanoramaPlugin_ID1.ocx", "c:\windows\system32\CubicPanoramaPlugin_ID1.ocx", True)
Call CopyFileW(App.Path + "\lib\QuickTimeSimple.ocx", "c:\windows\system32\QuickTimeSimple.ocx", True)
Call CopyFileW(App.Path + "\lib\KeyGuard.ocx", "c:\windows\system32\KeyGuard.ocx", True)
Call CopyFileW(App.Path + "\lib\ThirdPersonPluginOCXVER1.ocx", "c:\windows\system32\ThirdPersonPluginOCXVER1.ocx", True)
'Register all common Adventure Maker plugin controls and dependencies:
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\msvbvm60.dll /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Oleaut32.dll /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Olepro32.dll /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Stdole2.tlb /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\ctl3d32.dll /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Comcat.dll /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Asycfilt.dll /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Gif89.dll /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\FoxCBmp3.dl /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Msdxm6.ocx /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Msscript1.ocx /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\Msimg32.dll /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\AAVideoLoaderProj.ocx /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\AMPanoramaPlugin_ID7.ocx /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\CubicPanoramaPlugin_ID1.ocx /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\QuickTimeSimple.ocx /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\KeyGuard.ocx /s", 5)
Call WinExec("c:\windows\system32\regsvr32.exe c:\windows\system32\ThirdPersonPluginOCXVER1.ocx /s", 5)
'Run the game and then close the silent installer:
Call WinExec(App.Path + "\lib\run.exe", 5)
End
End Sub
Return to Post Your Own Tutorials
Users browsing this forum: No registered users and 0 guests