Jump to content
Sign in to follow this  

Problem with using gimagex_com.dll in Autoit

Recommended Posts


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

; 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

Func Main()

   ; Set theme app properties
   DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 1)

   ; Hide tray

   ; 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

   ; Wait for exit code
   While 1

      Switch GUIGetMsg()

         Case -3





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


   $objWIM = 0

   GUICtrlSetData($oLabelText, $aLabelText[0] & $objEvent.Percent + 1)
   Until $objEvent.Percent <= 100

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.