doestergaard Posted May 8, 2014 Share Posted May 8, 2014 I am trying to implement gimagex COM dll for use with imagex and the apply image function. The problem is, it doesn't Work, either with VBScript or Autoit Its busy for a while then stops and doesn't return any error However, for the VBScript, it says that it is not connected to "CreateObject" Anyone knows why this happens? I have written this short script for testing expandcollapse popup; Program: ImageXGUI ; Programmer: Daniel Østergaard Nielsen ; Version: 1.0 ; Date: May 7, 2014 ; Variables Global $hOSDLoader = GUICreate("OSDGUI", 468, 80, -1, -1, 0x80000000+0x00400000) ; Call main function Main() Func Main() ; Set theme app properties DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 1) ; Hide tray TraySetState(2) ; GUI Controls Global $oLogo = GUICtrlCreateIcon("logo.ico", "", 8, 8, 64, 64) Global $oLabelTitle = GUICtrlCreateLabel("OS Deployment", 88, 9, 300, 20) Global $oLabelText = GUICtrlCreateLabel("", 88, 30, 450, 20) Global $aLabelText[1] = ["Applying image "] ; Set font types GUICtrlSetFont($oLabelTitle, 12, 600, Default, "Microsoft Sans", 0) GUICtrlSetFont($oLabelText, 10, 300, Default, "Arial Sans Serif", 0) ; Register gimagex_com ;RunWait("regsvr32.exe " & "c:\users\doni\desktop\imagextest\gimagex_com.dll" & " /s", "c:\windows\system32") ; Call OSDLoader ApplyImage() ; Wait for exit code While 1 Switch GUIGetMsg() Case -3 ExitLoop EndSwitch WEnd EndFunc Func ApplyImage() ; Create objWIM $objWIM = ObjCreate("GimageX.GimageXCtrl") $objEvent = ObjEvent($objWIM, "WimEvent_") ; Show gui GUISetState(@SW_SHOW, $hOSDLoader) With $objWIM .Source = "C:\Users\Doni\Desktop\imagextest\win7pro32.wim" .Destination = "C:\Users\Doni\Desktop\imagextest\dest" .ImageIndex = 1 .Check = True .Verify = True .ApplyImage EndWith $objWIM = 0 Do GUICtrlSetData($oLabelText, $aLabelText[0] & $objEvent.Percent + 1) Until $objEvent.Percent <= 100 EndFunc Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now