madsbrodersen Posted July 27, 2007 Share Posted July 27, 2007 DeletelHandle = 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)MountWIMMountImage(ConvertToUniCode("Path_To_Mount"), ConvertToUniCode("Path_To_Wim"), ImageNumber, ConvertToUniCode("Path_To_Temp"))UnmountWIMUnmountImage(ConvertToUniCode("Path_To_Mount"), ConvertToUniCode("Path_To_Wim"), ImageNumber, True/FalseSaveChanges))Get Number of Images in WIM filelHandle = 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. Link to comment Share on other sites More sharing options...
killerlp Posted July 30, 2007 Share Posted July 30, 2007 (edited) HiI 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 August 2, 2007 by killerlp Link to comment Share on other sites More sharing options...
trtkron Posted July 31, 2007 Share Posted July 31, 2007 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. Link to comment Share on other sites More sharing options...
ubernerd Posted July 31, 2007 Share Posted July 31, 2007 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) Link to comment Share on other sites More sharing options...
p4ntb0y Posted August 1, 2007 Author Share Posted August 1, 2007 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! Link to comment Share on other sites More sharing options...
chiners_68 Posted August 2, 2007 Share Posted August 2, 2007 Hi Guys, i cannot get this to run in vistaPE. can somone help.ive got all these files in windows directoryimagex.exeintclg.exewinfltr.iniwinfltr.syswimgapi.dll& getwiminfo.bat & ondanswin.exe.When i run the exe file from the cmd prompt in PE nothing happens. Where am i going wrong..? Link to comment Share on other sites More sharing options...
p4ntb0y Posted August 5, 2007 Author Share Posted August 5, 2007 Sorry for the late reply..Add the following files...tabctl32.ocxmscomctl.ocxI 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. Link to comment Share on other sites More sharing options...
solutionone Posted August 17, 2007 Share Posted August 17, 2007 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? Link to comment Share on other sites More sharing options...
p4ntb0y Posted August 19, 2007 Author Share Posted August 19, 2007 Please see first post for edits Link to comment Share on other sites More sharing options...
SamboA Posted September 1, 2007 Share Posted September 1, 2007 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 directoryI'm booted to a Win PE 2.0 Boot CD.imagex.exeintclg.exe--->Can't find this exe ???????? Where it be ????winfltr.iniwinfltr.syswimgapi.dlltabctl32.ocxmscomctl.ocxgetwiminfo.batondanswin.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 forPartition 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..? Link to comment Share on other sites More sharing options...
p4ntb0y Posted September 2, 2007 Author Share Posted September 2, 2007 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.exeThis 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 Link to comment Share on other sites More sharing options...
SamboA Posted September 2, 2007 Share Posted September 2, 2007 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.exeThis 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 guiI did copy to my Flash Drive Folder from my windows aik\tools\x86\intclg.exe hoping it would cause theGUI 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 Link to comment Share on other sites More sharing options...
p4ntb0y Posted September 2, 2007 Author Share Posted September 2, 2007 can you try and re create your problem in vmware and send me a screenshot? Link to comment Share on other sites More sharing options...
martinr Posted September 7, 2007 Share Posted September 7, 2007 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. Link to comment Share on other sites More sharing options...
geezery Posted September 7, 2007 Share Posted September 7, 2007 Looks very nice. 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