p4ntb0y

Imagex GUI Open Source

39 posts in this topic

Delete

lHandle = WIMCreateFile(ConvertToUniCode("Path_To_Wim"), WIM_GENERIC_WRITE, WIM_OPEN_EXISTING, WIM_FLAG_SHARE_WRITE, WIM_COMPRESS_XPRESS, 0)
WIMSetTemporaryPath(lHandle, ConvertToUniCode(oWSHShell.ExpandEnvironmentStrings("%Temp%")))
WIMDeleteImage(lHandle, cmbImageNumber.Text)
WIMCloseHandle (lHandle)

Mount

WIMMountImage(ConvertToUniCode("Path_To_Mount"), ConvertToUniCode("Path_To_Wim"), ImageNumber, ConvertToUniCode("Path_To_Temp"))

Unmount

WIMUnmountImage(ConvertToUniCode("Path_To_Mount"), ConvertToUniCode("Path_To_Wim"), ImageNumber, True/FalseSaveChanges))

Get Number of Images in WIM file

lHandle = WIMCreateFile(ConvertToUniCode("Path_To_Wim"), WIM_GENERIC_WRITE, WIM_OPEN_EXISTING, WIM_FLAG_SHARE_WRITE, WIM_COMPRESS_XPRESS, 0)
iNumberOfImages = WIMGetImageCount(lHandle)
WIMCloseHandle (lHandle)

Do you have any samplecode involving WIMMessageCallback function?

I have been writing a wrapper for WIMGAPI.dll in vb6, but im having trouble obtaining the progress in applying and capturing the image.

0

Share this post


Link to post
Share on other sites

Hi

I managed to get it running in vista and xp os itself. However in Vista PE, i get a Run-time error '429' ActiveX component cant create object". The GUI launches but i cannot do anything with it.

Any help?

Thx

:)

Daniel

Edited by killerlp
0

Share this post


Link to post
Share on other sites
Do you have any samplecode involving WIMMessageCallback function?

I have been writing a wrapper for WIMGAPI.dll in vb6, but im having trouble obtaining the progress in applying and capturing the image.

No I don't.

The reason for you problem is that Wimgapi is multithreaded so you have to create a form/progressbar/whatever + callback for it on the fly to track the progress when using VB6.

0

Share this post


Link to post
Share on other sites

I have done some coding with the wimgapi.dll and there is no way you can make vb6 callbacks with the WIMMessageCallback function as VB6 uses a STA (single threaded appartment) model for all its events, and wimgapi.dll uses the MTA (multi threaded appartment) model for the callbacks.

The only solution I found was to built an ActiveX component (in native C++ code) that receives the callbacks and handles the callback as an normal ActiveX events.

I'm unable to share the code as it is part of our commerical solution, but I'll provide hint and pointers if anyone is interrested.

If anyone has another solution to this I'd like to know about it. Preferable one that does not include endless hours of C++ coding (not my strongest language)

0

Share this post


Link to post
Share on other sites

Intresting...

I way out of my depth here with the coding but I am trying to learn as I go.

Basically what be nice is a standard gui with all the options that has a progress bar and will work in winpe 2005 and winpe 2.

Maybe I should bin the vb stuff and just code in c++

I have seen smartwim.dll but it costs $299!

0

Share this post


Link to post
Share on other sites

Hi Guys, i cannot get this to run in vistaPE. can somone help.

ive got all these files in windows directory

imagex.exe

intclg.exe

winfltr.ini

winfltr.sys

wimgapi.dll

& getwiminfo.bat & ondanswin.exe.

When i run the exe file from the cmd prompt in PE nothing happens. Where am i going wrong..?

0

Share this post


Link to post
Share on other sites

Sorry for the late reply..

Add the following files...

tabctl32.ocx

mscomctl.ocx

I will update soon with source files I am not a coder you see so I am on a rapid learning curve.

chiners 68 if you pm me I give you my mail address seen your in the UK same as me.

0

Share this post


Link to post
Share on other sites

Hi, this project looks awesome, I had been using the Imagex HTA but have found several limitations and the project itself unfortunately seems to have ground to a halt on the MSFN board.

I have read through all the posts and was wondering if someone could tell me the current status of the gui itself. Does it currently work in Vista PE, what features currently don't work, and is there a completion time frame?

0

Share this post


Link to post
Share on other sites

Hi Guys, i cannot get this to run in WinPE 2.0. can somone help.

I've got all these files on a flash drive in same directory

I'm booted to a Win PE 2.0 Boot CD.

imagex.exe

intclg.exe--->Can't find this exe ???????? Where it be ????

winfltr.ini

winfltr.sys

wimgapi.dll

tabctl32.ocx

mscomctl.ocx

getwiminfo.bat

ondanswin.exe.

When I run the exe file from the cmd prompt in WinPE

I get.....

Run-Time Error '429'

ActiveX Component Can't

Create Object.

I click OK on that.

Imagex GUI Dialog Box Comes up but headings for

Partition to Capture is missing.

And also Heading for Backup Filename Missing too.

I enter the info in the boxes anyway but when I click

Button to Start the imaging it Does Nothing.

Where am I going wrong..?

0

Share this post


Link to post
Share on other sites

Hi when your making your winpe image I would mount the boot.wim within sources and add the files there in system32 so that you do not have to do the full path for imagex.

The intclg.exe is in my windows aik\tools\x86\intclg.exe

This is just a wrapper dont forget the cmd will be displayed at the bottom of the gui if you cant run the cmd by the cmd then its not going to work in the gui

0

Share this post


Link to post
Share on other sites
Hi when your making your winpe image I would mount the boot.wim within sources and add the files there in system32 so that you do not have to do the full path for imagex.

The intclg.exe is in my windows aik\tools\x86\intclg.exe

This is just a wrapper dont forget the cmd will be displayed at the bottom of the gui if you cant run the cmd by the cmd then its not going to work in the gui

I did copy to my Flash Drive Folder from my windows aik\tools\x86\intclg.exe hoping it would cause the

GUI to execute ok but I still get a dialog box that appears to be missing headings for the entries to be filled in with

Drive to capture and Backup location and description. When I click on the "Capture WIM Image button" Nothing Happens. Oh Well !!! I must be missing something. I've used ImageX command line out of this Flash Drive folder

as it is and it works fine. I wanted to try this GUI because it really speeds up the process of getting things started and

eliminating my "Fat Finger" mistakes. My command line is pretty long.

"G:\Imagex GUI\imagex.exe" /config "G:\Imagex GUI\Skipmore.ini" /COMPRESS maximum /capture C: "D:\Images-WIM4-24-2007 Data C-Image.WIM" "04-24-2007 Data C-Image.WIM"

I'll watch the forum some more and maybe these old eyes will see the errors of my ways !!!!

Thanks

0

Share this post


Link to post
Share on other sites

can you try and re create your problem in vmware and send me a screenshot?

0

Share this post


Link to post
Share on other sites
Basically what be nice is a standard gui with all the options that has a progress bar and will work in winpe 2005 and winpe 2.

Maybe I should bin the vb stuff and just code in c++

You inspired me to do this, and I have just finished my project.

I have written a program called WIMMaster which gives a graphical interface to the Wimgapi library. I wrote the program in C using Visual Studio 2005. It is similar in looks to OnDansWIM, but is quite different below the surface.

I was able to get the progress bar going for Capture/Append and Export, but had no success with Apply. The reason for this is that the WIMApplyImage function in wimgapi apparently spawns a separate thread for its work, and somehow this blocks the communication needed to run the progress bar. I used a modeless dialog instead to indicate that something was going on.

I have a file which contains all my source code, and also a BartPE plugin and a VistaPE script with all the files encoded into it, except for wimgapi.dll and wimfltr.sys which are of course required for both the plugin and the script. My file is too big to upload here, although it is not all that large. It is available for download here.

Anyone wishing to use the source code will need the Wimgapi SDK which comes with the WAIK, and also Visual Studio 2005. Visual Studio 2003 seemed to have problems reading wimgapi.h, because of all the __in, __out and other similar descriptors it uses.

A number of interesting points arise in the source code. One of them is that the use of a file name for an image is not mandatory as it is with imagex, although it obviously makes sense to have one in a multi-image file. It is actually quite complicated to get the names and descriptions into the wim; I had to write a special function to edit the image to achieve this.

I hope that some will find the coding instructive, and the program useful. It seems to work as well as imagex does.

0

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

  • Recently Browsing   0 members

    No registered users viewing this page.