Help - Search - Members - Calendar
Full Version: WinPE 2.0 GimageX COM based HTA
MSFN Forums > Unattended Windows Discussion & Support > Windows PE
Pages: 1, 2, 3, 4, 5, 6, 7

   


Google Internet Forums Unattended CD/DVD Guide
Tripredacus
I do not use that button. I replaced that function with my own drive mapping program. I use it only as a last resort as the startnet.cmd is supposed to do the drive mappings before the HTA is even loaded.
SoultakerPT
thumbup.gif understood!
surrealpro
i would like to say thank you very much for an outstanding solution for a gui to imagex. i have a few questions that have been brought up in a few past posts but not sure if ever answered.

a. i would like to use the map drive option, but the pop screen does end up out of screen with no way to move it.

b. this one is more important but i use nothing but winxp images and would like to incorporate the bootsect command into this proceeds to make it fully unattended or work within our environment. any code or help with this would be greatly appreciated.

c. is there still an option or way to remove the new none working progessbar, and show the ugly command prompt window? at this time it looks as if it has just hung.

thank you everyone for your help.

d@ve
geezery
Hello all,

I have not been here reading for very long time. I have made very much changes for the version that is currently downloadable to the public. I have reverted back to the ImageX.exe usage for some functions, because I have found some problems when using the gimagexcom ActiveX. It is still in the package, but I'm only using it for some functions.

If someone is interested testing it I can give the link, just put an email to the address that is found from the first post.

Here is some things that are changed:

* Cleaned up the code a lot
* Added the "bootsect.exe /nt52 C: /force" command after the image has been applied. (I'm also using this for Windows XP deployment only) This can be easily changed to /nt60 if you are applying Vista images.
* Fixed the bug in the Map network window going out of the range
* Changed the (Apply,Capture & Append) functions to use the imagex.exe instead of the gimagex com
* Added a Delete function (Can delete entries from imagelist)

etc....

geezery
chew118
thanks for all the hard work. I send you my email for the link...
surrealpro
email sent, thank you so much...

d@ve
Tripredacus
I'd like to try it out I suppose. I've made so many changes to the current version that it wouldn't be worth it to update to the newer version.

Hope you don't mind I've been kinda advertising this thread in my sig. I did it more so I would be able to find it if I needed it.
geezery
I have sent the link to all of those who have sent me email.

Tripredacus ->

Can you tell me more about your modifications?

Sounds very interesting.
Tripredacus
I have done the following:

Changed the background pic. You can see this a couple pages back, I uploaded them.

Changed some functions for the buttons at the bottom. Removed Map Network drive, capture image, append image. I changed these to launch my own applications, one that Maps 2 network drives at once, kills mshta and relaunches the HTA again. I couldn't automate the reload button. I also have it launch programs to preinstall applications for Vista and XP. I have other things I'm going to change in the future that I haven't gotten to yet:

- change the prompt after imaging complete to restart instead of shut down, and also have option for Restart or install programs instead of cancel.

you seemed to have given up. I need another feature which I was going to do myself. When the DISKPART menu comes up (besides the complaint that I can't use the keyboard on that screen) I need another option. I come across some systems (notebooks) that have media drives that the WinPE makes the C drive, so the script doesn't work automatically because it can't assign Disk 0 a drive letter (its already taken). So I have to manually go into diskpart and reassign vol 1 drive letter to another letter before I can format the drive to C and start the image.

So.... FEATURE REQUEST: add another radio button to the Diskpart pop-up that says "use custom diskpart.txt" file. You click that, browse to the file, select it and click proceed. So that way I can have a custom text file to do diskpart if I have to do one of those notebooks.

I'm in a flux right now (business stuff) with imagex so I'm not sure what my future with it will be. no.gif
KenKightly
I have gotten a lot of use out of this script, and modified it heavily for my own use.
I really appreciate the work that’s been done here.

On that note, I would like to contribute to this group.

I have seen several posts where people have had issues using USB drives due to the nature of there dynamic allocation of a drive letter.

I have a script that will find the drive letter of your USB drive, and change it to the drive letter of your choice. I have created this so I can run this script from my USB drive with the drive letter assign as Z:.

There are a couple of prerequisites that need to be followed first. They have to do with the setup of the USB drive initially.

My USB drive has 2 partitions. The first partition is a 1GB partition that holds the boot files for WinPE. The second partition holds the script and image files, and is 460GB.

The 1st partition should be formatted as Fat32, and should be setup to boot your WinPE.
The following article is a good one for this. (hint look for creating a UFD boot disk)
http://technet.microsoft.com/en-us/library/cc709665.aspx

Once you have the WinPE boot created, format the second partition using NTFS, and label the volume IMAGE This is important because the script looks for this drive by its volume label and gets the drive letter.

The attached zip file contains 4 files.
startnet.bat (this is an example and should not be coppied to your winpe windows\system32 dir.)
getUSBLetter.bat (copy this to your WinPE windows\system32 directory)
chgletter.txt (copy this to your WinPE windows\system32 directory)
image.bat (copy this to your WinPE windows\system32 directory)

What are the scripts doing.

The first script is getUSBLetter.bat.

This script uses a filesystem object to look at all “hard disks” on your system, then find the volume with the label of “IMAGE” it also sets the drive letter in the variable USB, which can be used in scripts.

The second task of the script is to change the drive letter that it finds using diskpart. In my case I have a chgletter.txt file that I pass to diskpart that changes the %USB% to Z

The third part of the script is basically the same as the first, and queries the drive again and resets the variable USB to the new drive letter.

At the end of this bat file it calls image.bat file that will cd to the drive letter %USB% and starts the wizard.hta.

I am sure there are better ways to achieve this, but this works well for me, and I haven’t seen any post here to help those users who are looking for a solution.

I hope this is useful.

Ken.
Click to view attachment
geezery
I released the newest version to the public. You can found download / setup information from here.

http://geezery.pp.fi/

-> Tripredacus

I can add that alternative diskpart configuration file to the next release. I hope I can add something else also.
KenKightly
geezery,

The latest version is awsome.
I had to make one minor change, I had to change line 644

If cmdpc > 1 Then

I had to change this to 2 for my setup. I guess the command window that I enter the cmd.exe /c mshta.exe z:\imagex.hta
and the window that is opened for the hta count as more than one and I was getting the error to close a command window.
There werent any windows for me to close without the application closing.

Keep up the good work!

Ken.
geezery
QUOTE (KenKightly @ Feb 9 2009, 10:51 PM) *
geezery,

The latest version is awsome.
I had to make one minor change, I had to change line 644

If cmdpc > 1 Then

I had to change this to 2 for my setup. I guess the command window that I enter the cmd.exe /c mshta.exe z:\imagex.hta
and the window that is opened for the hta count as more than one and I was getting the error to close a command window.
There werent any windows for me to close without the application closing.

Keep up the good work!

Ken.


Hello, you can launch the HTA without cmd /c. If you launch it like that it won't close the cmd.exe process in the background. It stays open as long as you can see the HTA in front of you. You don't have to make that change to line 644 if you launch the hta directly without the extra cmd.exe. You can see this scenario by launching the tasklist.exe from the command line. There is the extra cmd still open.

I have to count the number of opened cmd.exe processes, because the diskpart logic is based on that.

You also asked if it would be possiple to apply the image to i.e. D: drive. You can now select where to apply the image. The default value is still C:, but you can change it to what ever you want.
KenKightly
Thanks Geezery.
I noticed the ability to select the drive letter after I posted, so I changed my post.

Thanks again the the great work you have put in to this.

Ken.
Tripredacus
I think I'm going to have some extra time tomorrow, so I might be able to test out your new version.
thebearpoo
Thanks for the update, Geezery.
Tripredacus
I fired up WinDiff to check the new version against my custom version. There isn't anything in this version for me to add really. The code differences aren't that big a deal to me. I did see (I think) that you removed the progress bar support during the /apply command. Instead of trying to make the incremental progress bar (as it would appear you wanted) how about just having an animated GIF or something to be on the screen? If could just be a fake progress bar. I've received complaints from my users about the progress bar because sometimes it doesn't even show up. Of course it would always appear as a gray rectangle.

I also see that you put my custom WinPE backgrounds up on your site. Can you drop me a credit on your site someplace for them?

I am going to be doing testing of WinPE 3.0 using your HTA (or my version of it) on both x86 and amd64 versions of WinPE. I will let you know if I encounter any problems.
grungething
Thanks for your response, seen the guid and it is way better. I'm now almost there and am delighted with the result. However just one small problem is the resolution is not changing to 1024x768. It still works and you can just see the buttons, but it would be a ot nicer if it was the 1024x768 res. Any ideas what to look for?

setres program is in misc folder too, havn't changed any setting in the hta file either.
Tripredacus
QUOTE (grungething @ Mar 2 2009, 08:10 AM) *
Thanks for your response, seen the guid and it is way better. I'm now almost there and am delighted with the result. However just one small problem is the resolution is not changing to 1024x768. It still works and you can just see the buttons, but it would be a ot nicer if it was the 1024x768 res. Any ideas what to look for?

setres program is in misc folder too, havn't changed any setting in the hta file either.


Resolution options are on line 26 of the HTA.

CODE
SetResSettings = "1024 768 32 1"                          'Setres default parameters.


Make sure your file has these same settings.
Kingskawn
Super interesting this tool! Can you please tell me how it works if you want to install xp on a new machine. How can you push the wim file on it? With 'how' I mean, what information do you use to deploy it, MAC, GUID,...? Or is it only on one machine at the time?

I could use such a tool if I can install xp on a distant machine (LAN) if I only know the MAC address. (I already have a running WDS so machines can boot on PXE and of course a DHCP server smile.gif )
Tripredacus
QUOTE (Kingskawn @ Mar 2 2009, 01:24 PM) *
Super interesting this tool! Can you please tell me how it works if you want to install xp on a new machine. How can you push the wim file on it? With 'how' I mean, what information do you use to deploy it, MAC, GUID,...? Or is it only on one machine at the time?

I could use such a tool if I can install xp on a distant machine (LAN) if I only know the MAC address. (I already have a running WDS so machines can boot on PXE and of course a DHCP server smile.gif )


This program is run from the client and is not automated to the point that it doesn't require interaction. Its more of a GET instead of a PUSH with this, it is just an app that runs in the PE.
Kingskawn
No plans to do this from a central machine that can deploy xp on the same lan? Or is there another HTA from someone else that can do this smile.gif
Tripredacus
I'm not sure I am getting what you are asking. So instead, I will just run down how I use it.

I took the original HTA (I'm using the older version but the same can be done with the current) and modified it. There are some things you need to modify, such as the Imagepath, which tells the HTA where to look for the images. I changed it to z:\. Then I edit my startnet.cmd file and have it map the Z: to the folder the WIMs are located in. Also need to add regsvr32 for the DLL included with the download, and lastly use mshta to launch the HTA itself. Rebuild the PE.wim and update it in WDS.

Then you have your client that you want to image. Presuming you have images already or you can make new images. You boot to the network. If your WDS is set up properly, it will load the WinPE up on a RAMDISK on the client. The PE loads, turns on networking, maps the network drive, registers the DLL and opens the HTA.

The HTA will then show you what images you have. If it can't find any images (or perhaps you don't have any yet) It will open a browse box. If you do have images, they will be listed. You select the WIM and image you want, and it will format the drive. After this it copies the image down. When it is done, you can reboot or shut down.

This method works best on a WDS running Server 2008, as it supports multicast. Server 2003 has issues with more than 4 clients (in my experience and my setup). So using this HTA I can image up to 40 clients at once. 40 happens to be the number of interfaces I have on the same subnet as the WDS.

See IcemanND's Win PE guide which is stickied to learn how to make your Win PE media (or boot image) and how to capture images.
Kingskawn
I'm using SCCM to deploy machines now. What I thought this hta was, was a frontend where you can deploy xp from a central machine (can be a server or normal desktop machine) where resides the wim files and all the stuff that is needed in order to stage machines remotely.
But this hta doesn't allow remote installations, it's all on individual machines that the hta page must be loaded and execute.
In SCCM I deploy a wim files that contains the xp OS but after that it gets a whole bunch of software programs installed on it.
Tripredacus
Its not that it doesn't allow it, but that isn't its function. It is meant for the clients, not for the server.
Tripredacus
Geezery! I got another feature idea!

I do most of my image administration from within the PE and not the server. It would be handy if, in the main display of the images within the wim, that the image index number is also displayed. Currently, all images are arranged alphebetically by their image description. This means that the images are not in order based upon their index (the order they were captured/appended) value. It is easier to perform image maintenance with the image index, especially if there are long image descriptions. Also, if you have a lot of images, it would be easier to acquire the image index value, otherwise I have to use the following:

CODE
imagex /info z:\xp_intel.wim > c:\wim_info.xml


This has to be done because sometimes the XML information is more than be fit into the PE Command Prompt window.

thumbup.gif
geezery
Hello,

I removed the GImageX dll dependancy from the HTA, but I haven't tested it yet. I think it should work without it. It uses only imagex.exe for image handling now.

I also added the Index number to the description if that was your wish Tripredacus. Can you try the new HTA, you can download it from

geezery
ducati31
hello all. im new to MSFN.

How do i get a copy of Geezery files? The link has been removed and there is nothing on the homepage?

Cheers
Tripredacus
The original author has abandoned this project, so I am taking over its sponsorship. I cannot take any requests for adding or updating new features to the software.

UPDATE
Working on v9.1 update.

Last available versions
Version 7.1 :: download
Version 9.0 :: download
Cleaned up Version 2.0 by Fredledingue :: download

Custom PE backgrounds
Embedded by Tripredacus :: download
Vista by Tripredacus :: download
Turge
After spending quite a few hours trying to get an HTA to receive the progress event from GimageX and display a progress bar, I can finally say that I achieved everything I was targetting. Since I still have to clean up the code before posting it, I'll just post a screenshot of my app for now to see what kind of interest it generates.

I should also point out that it currently works on Windows XP/Vista/7 and Windows PE 1.5/2.0/3.0 using all versions of GimageX.

So let me know what you think..
Tripredacus
The reason behind the progress bar reported has been answered here:
http://www.autoitscript.com/forum/index.ph...=winpe&st=0

However, the Win PE 3.x series has fixed this issue, but I have not done any testing on that platform yet.

If you post your code, use the codebox tag.
Turge
I looked at the thread and did not find a solution for receiving events via an HTA and updating a progress bar. Did I miss something?
Tripredacus
QUOTE
I get the callbacks while capturing, but for some reason the whole thing gets blocked when I apply the image. As soon as the image is completely applied I get the whole callbacks in one bunch. (not very useful I guess)

All I could gather from the MSDN forums was that it has something to do with MS enabling multithreading in the "apply" function. So the callbacks never reach my AutoIt instance.


and

QUOTE
They never call fflush() on the stream. The output builds up and is not flushed until the program closes. AutoIt shows you the output the instant it sees it, but during the entire run of the program, the ouput is buffered in imagex. By the way, you can confirm that it's not AutoIt's fault by using the command line and re-directing output to a file when using the /scroll argument. Even doing that will leave an empty file (IIRC, there is some output, but not the progress percentage). Then when the program is done, poof, magically all the data is there. Without using the /scroll argument, data is written directly to the screenbuffer and not to stdout."


On page 2, a poster confirms that the Windows 7 PE is able to report the progress.
Alenat
Hi guys,

I extracted zip file into system32 folder of my WinPe and started imagex.hta.
I tried both 7.1 and 9.0 versions and got the same error from HTA:

Object Required:'ObjWIM"

for version 7.1 in line 222
for 9.0 in line 205

Digging the thread I understood there is no DLL to register now.
If anybody already bumped to this?

Thanks!
Tripredacus
QUOTE (Alenat @ Sep 2 2009, 07:16 PM) *
Hi guys,

I extracted zip file into system32 folder of my WinPe and started imagex.hta.
I tried both 7.1 and 9.0 versions and got the same error from HTA:

Object Required:'ObjWIM"

for version 7.1 in line 222
for 9.0 in line 205

Digging the thread I understood there is no DLL to register now.
If anybody already bumped to this?

Thanks!


You need to register the DLL in the 7.1 version. V9.0 and 9.1 never fully passed development stage and should be considered alpha or beta versions. I have never gotten 9.x to work properly and still use a 7.1. Make sure your PE is using the HTA, Scripting and XML packages at the minimum. Also this works with WinPE 2.x x86, I have not seen or tested it in WinPE 2.x x64, or either build of WinPE 3.0.
greenfrognet
Hi friends, may be i come a little late to this post but i still have the same problem with the error Object Required:'ObjWIM" for version 7.1 in line 222 i try to register the wimgapi.dll over my winpe but after the command regsvr32.exe wimgapi.dll i recive the following error :

"The Module e:\wimgapi.dll was loaded but the entry-post DllRegisterServer was no found."

"Make sure that wimgapi.dll is a valid dll or ocx file and try again"

What is my mistake?

thanks Guys

King Regards

Tripredacus
QUOTE (greenfrognet @ Oct 15 2009, 11:22 AM) *
Hi friends, may be i come a little late to this post but i still have the same problem with the error Object Required:'ObjWIM" for version 7.1 in line 222 i try to register the wimgapi.dll over my winpe but after the command regsvr32.exe wimgapi.dll i recive the following error :

"The Module e:\wimgapi.dll was loaded but the entry-post DllRegisterServer was no found."

"Make sure that wimgapi.dll is a valid dll or ocx file and try again"

What is my mistake?

thanks Guys

King Regards


regsvr32 /s misc/gimagex_com.dll
greenfrognet
hoooo. fool of me, jejejejeje thanks ohmy.gif tongue.gif biggrin.gif
greenfrognet
Hi Guys, good day, i have another question, i hope all off you culd help me,

everithing is ok but i can´t see the description of the wim, i can chose a Wim but the hta dont display the list of the append image inside the wim. i got all packages of wimpe installed.

Some suggest
Tripredacus
What PE version do you have, and did you add the packages you need? Can you see the drives on the right side?

You need the following packages:
- HTA
- Scripting
- WMI
- XML
astrouga
I installed version 71 and the GUI seems to mostly function, but I am having trouble getting the window and image to fit the screen. It looks like several changes would be needed to get this to work -- at least altering the css and changing the background image size.

On another note, I found this HTA designed for Ghost project first and really liked that it loads a text file with the image details when you select an image radio button. Is this something that I can do with this HTA?

Thanks.
Tripredacus
You may need to play with the SETRES settings in the first part of the HTA to find a resolution that works best for you.
astrouga
I am testing this on Win PE 3.0 for Windows 7 imaging.

I got SETRES working. Now, when I have a file selected on my image server, it lists the file name in the pull down menu, then under "Select Image to Apply:" I see a single radio button with "9630" next to it. I couldn't determine what this was referring to from the code. Any ideas? I have attached a snap.

Also, any progress on v91?
Tripredacus
QUOTE (astrouga @ Nov 13 2009, 02:12 PM) *
I am testing this on Win PE 3.0 for Windows 7 imaging.

I got SETRES working. Now, when I have a file selected on my image server, it lists the file name in the pull down menu, then under "Select Image to Apply:" I see a single radio button with "9630" next to it. I couldn't determine what this was referring to from the code. Any ideas? I have attached a snap.

Also, any progress on v91?


I can tell by the screenshot that you are using Win PE 3.0.
whistling.gif

To resolve your issue, you will need to use the code fix in this thread:
http://www.msfn.org/board/imagex-hta-win-p...64-t138048.html

As noted in the first post any further development is community based only. v9.1 only removed the DLL requirement, and added the image index to the WIM display list. There was supposed to be a way to browse for a diskpart file but that never happened.




Google Internet Forums Unattended CD/DVD Guide

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.