• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
geezery

WinPE 2.0 GimageX COM based HTA

357 posts in this topic

Very nice, I have also been contacted a other member of this forum, who has some nice features in the hta. I'm currently so busy at my work that I don't have the needed time to implement new features + test new version. The scripts that I have made is totally free to use and modify.

But if you get some nice features done, please post those to the msfn community.

gc metal keep up the great work, very nice HTA. I will check it when I have time.

Cool Geezery...will do. I'll see if I can make a Geezery/qc_metal hybrid and post my results here. Thanks for your permission on that!

0

Share this post


Link to post
Share on other sites

Ok, I would like to be have the first image pre-selected by default. Is there a simple way to set that up so that when I only have one image in the directory I don't have to select it before I can apply it?

0

Share this post


Link to post
Share on other sites
I think I'm going to add support for multiple *.wim files in the hard coded folder. Maybe it can be dynamic also. I have to change the code a lot.

If someone has example for me to get the imagex /info wimfile.wim output to variable I could make that easily.

There is a nice component available, but it is not free. ****

http://www.smartdeploy.com/products/index.htm

Use stdout.readall to get any commandline output into a variable. You need to use the .exec method, however in order to get this.

***edit*** - - - OH crap, I didn't see the follow up pages to this post! Sorry about that...

I also created an HTA for ImageX, and then I stumbled onto this page ;) - see the screenshots... Maybe we could combine our efforts? I've attached the HTA as a ZIP to this post. Also, there is a good example of how to utilize the browse for folder dialog in the HTA (very nice to have). You just need to supply comdlg32.ocx and imagex.exe to make the HTA work.

Update 10/16/07:

I've worked out some kinks with some logic, and have a .02a release for anyone who wants to try it. Now it will pull the Image info when using the 'apply' or 'append' functions. I'm working on 'delete' next.

Note that this one does not require an XML package to be installed in order for it to work - - this was to make things a bit more simple with regards to what you need in order to make this HTA to work. I know it is a cheeky solution, but it does work ;). Essentially, the HTA uses only filesystem objects, and nothing more (no WMI, either).

i get the following error when i try to use the browse function, i have copied comdlg32.ocx to program directory.

Line: 536

Char: 1

Error: The control could not be created because it is not properly licensed.

Code: 0

anyone can tell me what im doing wrong ?

TIA

0

Share this post


Link to post
Share on other sites

I am also getting the error about commmon dialog control license... How can i resolve this issue. And secondly when i add the hta and images folder to winpe and i launch from wihtin pe the images dont load. The background does and the ico file but not the other images? Any suggestions? Aside from that this is an awesome hta def what i was looking for THANKS ALOT!!!

0

Share this post


Link to post
Share on other sites

ok this looks like a good idea.

i have thrown your beta into a winre image. and all ok.

im going to have to rip large chunks of it out because my intention is to use the GUI as a replacement for my visual basic program to recover customers systems.

i need to block diskpart from ever touching partition 1. as this stores all of winre and the final installation image.

question: is it possible to get a progress bar to run instead of the ugly black box known as command promt? i'll look into it but if you know anything that could help, would be kool.

now one suggestion. if an image fails to deploy the ImageX.hta always reports that the image applied ok. could cause problems :/.

spose i need to brush up on my scripting skills.

but playing with your beta has inspired me to work on this further and give a nice front end for our customers.

0

Share this post


Link to post
Share on other sites
question: is it possible to get a progress bar to run instead of the ugly black box known as command promt?

try a search for 'wimmaster' has progress bar instead of cmd prompt.

is also one called 'gui imagex wrapper', doesn't have progress bars .. but just as good too.

both work good under 'winpe' or 'vistape'.

:thumbup

0

Share this post


Link to post
Share on other sites

I am having the same problems with the error on line 536 and 258 as well. I am using the comdlg32.ocx from my windows xp install, I do not have a copy on my server 2003 machine, and I did not find one mounting the vista install.wim either. I am using PE 2.0 btw. I have a cmd that copies all of the files and the img dir and it's contents to the X:\windows\system32 just to eliminate problems with the permissions. The img dir is there and correct, the only time I have problems I have is when I click on the browse button, I get those errors. If I could get that working, that would be uber slick!

Thanks guys for your work on these HTA's, they are going to be killer!

I also have all of the packages installed for PE 2.0

Edited by bigjon440
0

Share this post


Link to post
Share on other sites

Anyway to make the list of found images inside of a wim file split up into multiple columns instead of 1 big one? I have a wim with about 21 images in it and so everything gets pushed off and the hta window is not scrollable.

0

Share this post


Link to post
Share on other sites
Anyway to make the list of found images inside of a wim file split up into multiple columns instead of 1 big one? I have a wim with about 21 images in it and so everything gets pushed off and the hta window is not scrollable.

I second that request :thumbup ... My largest has about 13 and it is pushing everything off the page.

0

Share this post


Link to post
Share on other sites
Anyway to make the list of found images inside of a wim file split up into multiple columns instead of 1 big one? I have a wim with about 21 images in it and so everything gets pushed off and the hta window is not scrollable.

I second that request :thumbup ... My largest has about 13 and it is pushing everything off the page.

I third that request as I and my coworker have taken to going to a naming scheme like HP-1.wim HP-2.wim. I am working at a service centre and have like 130GB of image files. When I started here my coworker was operating from command line and not appending. I then found this forum and thread. I love this HTA and so does my co-worker. Thanks Geezery.

0

Share this post


Link to post
Share on other sites

I played for 5 minutes with the css file and the HTA and the result is this. If someone needs advice on how to change their hta to look like this send me an email. You can find the address from the first post. I know this is not the best solution, bu I don't have the time to make the script changes right now.

post-105112-1196835188_thumb.jpg

0

Share this post


Link to post
Share on other sites
Anyway to make the list of found images inside of a wim file split up into multiple columns instead of 1 big one? I have a wim with about 21 images in it and so everything gets pushed off and the hta window is not scrollable.

I second that request :thumbup ... My largest has about 13 and it is pushing everything off the page.

Are you talking about Geezery's or my HTA? I think I'm going to revisit the comdlg issue. This might be something that an AutoIT script would be more suited to (just the browse function).

Also, it might be a good idea for me to post a separate thread so the support questions aren't confusing the two. :)

Rob

Edited by qc_metal
0

Share this post


Link to post
Share on other sites

I am getting an error running scripts on this page for the latest version

Line 219

Char 1

Error: Object doesn't support this property or method: 'objWim.source"

Code 0

I have tried registering the Gimagex.dll, got 2 different testing images both launching imagex.hta 2 ways. 1 is calling mshata then imagex.hta, whilst the other is just calling imagex.hta Both of these get the same message.

0

Share this post


Link to post
Share on other sites

Ok, I have to look at the error you are getting.

The dll should be automaticly registrated.

There is some problems when defining the COM component like this.

<object ID="objWIM" viewastext style="display:none" CLASSID="CLSID:6DA4E9F4-B7A8-467F-B88D-588B456B2608"></object>

It doesn't seem to work under WinPE. I think I'll have to figure something else since it wonr work.

Edited by geezery
0

Share this post


Link to post
Share on other sites

I updated the com based ImageX.hta, but there is currently no support for progress indicator. If you find a way to show the progress indicator it would be more than nice.

0

Share this post


Link to post
Share on other sites

Thanks for this Geezery. It is working real nice now, shame about the progress bar. At least there is notification when it completes so you are not working completely blind.

0

Share this post


Link to post
Share on other sites
I updated the com based ImageX.hta, but there is currently no support for progress indicator. If you find a way to show the progress indicator it would be more than nice.

Take a look at this: ImageX COM

The author of AutoIt wrote up a COM for imagex and made a GUI for it and shows a progress. Maybe you can implement the use of the COM to grab the progress???

0

Share this post


Link to post
Share on other sites

The current release is using that COM component and it works nicely, but the progress bar doesn't work. If you find bugs please report them here.

I actually found one and I will repair it in the next version. I wish that I could some how show the progressbar also. I actually have the progress indicator working in the HTA if you are using it from the Windows XP or Vista. You just have to define the com component a bit different.

0

Share this post


Link to post
Share on other sites
The current release is using that COM component and it works nicely, but the progress bar doesn't work. If you find bugs please report them here.

I actually found one and I will repair it in the next version. I wish that I could some how show the progressbar also. I actually have the progress indicator working in the HTA if you are using it from the Windows XP or Vista. You just have to define the com component a bit different.

Sorry haven't tried your HTA in a while. So nothing from this code works? Can you get time remaining? If so could you use that to calculate progress????

Set objWIM = WScript.CreateObject("GImageX.GImageXCtrl", "objWIM_")

objWIM.Source = "test.wim"
objWIM.Destination = "c:\test"
objWIM.ImageIndex = 1
objWIM.Check = TRUE
objWIM.Verify = TRUE
objWIM.ApplyImage

WScript.DisconnectObject objWIM
Set objWIM = Nothing


Sub objWIM_Progress(Percent, TimeRemaining)
WScript.Echo Percent & "% - " & TimeRemaining & " sec(s)"
' Abort the operation by using the line below
'objWim.Abort = TRUE
End Sub

Sub objWIM_ProgressInfo(Info)
WScript.Echo Info
End Sub

0

Share this post


Link to post
Share on other sites

Believe me I have tried almost everything what you can do with that COM component.

Set objWIM = WScript.CreateObject("GImageX.GImageXCtrl", "objWIM_")

You cant define an object like this in HTA. It doesn't support multithreaded objects. I actually find another solution that works in Windows XP andVista but not in WinPE:(

0

Share this post


Link to post
Share on other sites
Believe me I have tried almost everything what you can do with that COM component.

Set objWIM = WScript.CreateObject("GImageX.GImageXCtrl", "objWIM_")

You cant define an object like this in HTA. It doesn't support multithreaded objects. I actually find another solution that works in Windows XP andVista but not in WinPE:(

What if you open up a VBS script window to display the progress rather right in the HTA itself would that work?? Or run it behind the HTA and have it put the output into a text file then have the HTA read the text file? Maybe name the text file what ever the percentage is and just have HTA refresh that directory showing the percentage (taken from the name of the text file)???? Just throwing some ideas out.

0

Share this post


Link to post
Share on other sites

I believe it is possible to do something like that, but I don't have the needed time to write such script.

0

Share this post


Link to post
Share on other sites

I just tried out the GimageX (COM Based) HTA today and have encountered an error.

Line:222

Char:1

Object Required: 'objWIM'

Code:0

it is this line:

objWIM.Source = myFilepath + objSel1.options(objSel1.selectedindex).text

Everything seems to work: I can select images or deploy them, but the image names within the WIM are blank. In my case, there are 2 WIMs and each only has 1 image in them. It shows a radio button after I select the image, but there is no words next to it.

EDIT: sorry, I didn't read the part in the first post that said to register the DLL... :\

It works now just fine.

Edited by Tripredacus
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.