Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

ImageX HTA with Win PE 3.0/4.0 x64/x86

- - - - -

  • Please log in to reply
66 replies to this topic

#26
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,766 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

That should not be a problem. My 2008 x64 WDS currently has 4 different boot images to choose from:

1. Atomic Bomb (WinPE 3.0 x86) ImageX Deployment Platform
2. BurnInTest (WinPE 2.1 x86)
3. Imagex (x86) (WinPE 2.1 x86) ImageX Deployment Platform
4. Imagex (x64) (WinPE 3.0 x64) ImageX Deployment Platform

So the WDS does not care what architecture the boot image is. WDSNBP figures out what the client can handle. If the client is only x86 CPU (like Celerons or Atoms or older) it will only show 1-3. The x64 boot image only appears in the menu if the CPU can handle 64bit OS.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg


How to remove advertisement from MSFN

#27
dicko1976

dicko1976
  • Member
  • 8 posts
  • OS:Windows 7 x86
Hi

This is a fantatsic tool.

2 additions I am trying to add to the HTA is the Description of the Images in the WIM file. I have edited the NAME section to see if I could get it but I would like to show both Name and Description for all the images within the WIM file ?

The other I am trying to add is information about the machine I am going to deploy to. I would like the Serial Number and Machine Model. I have added the vbs script to my HTA file but I cant seem to get it into the HTA. Probably I would like to put this above the Disk Information.

Any help would be great.

Thanks in advance

Dicko

#28
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,766 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

I'm not sure how to get the description out of the XML. I didn't write either the original nor modified XML code. For your other project, you are going to have to code it in VBScript in the HTA itself. If you are getting errors or not sure how to approach that, make a post here:
http://www.msfn.org/...s-cmdbatch-etc/
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#29
dicko1976

dicko1976
  • Member
  • 8 posts
  • OS:Windows 7 x86
Hi

Thanks very much for your reply. I managed to get the VBS script working to pull the Machine Names, Model and Memory installed.

Will look into this deeper and see what I can find.

Thanks again

Dicko

#30
dicko1976

dicko1976
  • Member
  • 8 posts
  • OS:Windows 7 x86
Hi

I have managed to create a wim file with several images. I have taken a basic windows XP image and then several different images from different laptops.

When I try to restore one of the newer images it takes less than 5 minutes to do but it only puts on the folder structure and no files ?

Do I have to restore the basic image first and then the newer image on top, if so is there no way of doing both at the same time?

I though it would put the image back that you requested and pull the relevant files ?

Thanks

Dicko

#31
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,766 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

Yes you can have multiple images in the same WIM file. I have not seen this type of behaviour before. Of course the first thing I do when I need to troubleshoot the HTA (or any custom program I put in there) is to open the command prompt and manually run the commands. This way we can see if it is a problem with the code or something else.

So in your case, on your server you want to get the image index value (makes things easier) and make note. So then in the command prompt in the HTA, you would do something like this:

diskpart /s diskpart.txt
OR
diskpart /s misc/diskpart.txt

I have moved my file, but I think there is one in MISC still. Then:

imagex /apply z:\images\image.wim 2 c:

When it is done, do a reboot and see how it goes.

Alternatively, you could inspect the folders with Notepad after the normal deployment. NOTE: Notepad will only see *.txt files and it may appear these folders are empty until you change the type to All Files.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#32
dicko1976

dicko1976
  • Member
  • 8 posts
  • OS:Windows 7 x86
Got that working now thanks but I have moved on a step.

I am running all this in windows pe 3.0, the HTA file and storage.

When I try to run the create or append a new wim option I follow it and it says that the image has been created or appended but when I look into it a bit further or refresh the HTA there is nothing else added either file wise or to the appended image.

I ran the command manually in dos screen and it throws up an error about disk space. I have the new wim file or appending file on a 1TB USB hard drive formatted in NTFS and created via diskpart. There is 400GB left on the disk and the wim file is only about 5GB.

If I do it manually with GImagex to the same USB hard drive then the image creates OK or appends OK.

Any ideas ?

Thanks

Dicko

Edited by dicko1976, 23 September 2010 - 03:43 AM.


#33
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,766 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

I'm not sure about using a USB drive. In theory it should work. Make sure you are using the correct drive letters. In my HTA I have replaced the functions of the capture and append buttons because I did not want our regular technicians to have the ability of changing the images. All of my images are stored on a file share. I do all my capture/append/delete work using the command prompt button.

Oh I have also seen there are some instances where imagex does not like capturing and saving the WIM file to the same physical hard disk. I ran into this problem when trying to create recovery with WinPE 2 on netbooks for XP.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#34
dicko1976

dicko1976
  • Member
  • 8 posts
  • OS:Windows 7 x86
Thanks for you response. The C: drive is where I am capturing the image and the usb is where the wim file is. If I do it via GimageX then it captures all OK.

I would like to use the HTA to capture and restore but if its not possible then it looks like GImageX. Just wanted a simpler screen for the engineers

Thanks again

Dicko

#35
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,766 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

I have made a v7.2 which is available on SkyDrive

This version has both 32bit and 64bit support. It includes a very simple readme. It has the fixes to the Messageboxes that I made, and the XML fix that Dabone made. It also includes the two background images I had created. Let me know if you have any problems with it. I made it from my customized version that I run, so hopefully it works properly! I have not tested it.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#36
surrealpro

surrealpro
  • Member
  • 4 posts
i first wanted to say thanks to everyone that worked on this hta, and for tripredacus for your time and taking this further. i have a few questions.

i have winpe 3.0 and just created a new win7 wim. i need to have our deskside techs use a thumbdrive to start upgrading users to windows 7.

do to the size limit on thumbdrives, do to the format, i have to split out .wim into .swm files.

i dont see any .swm file support within the code, is this correct, or something that i can add or change?

i also dont see a /apply function. in theory i would just like to have the deskside tech boot in winpe from the thumbdrive and be able to imagex /apply with new win7 .swm files onto the system.

im will to help if needed, just let me know!

thanks again for you help with this in advance.

d@ve

Edited by surrealpro, 06 October 2010 - 08:43 PM.


#37
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,766 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

This HTA was designed to use WIM files, which is why you aren't seeing SWM files. I have little to no experience with SWM files other than the ones WDS creates by itself.

If you want to modify the code to work with SWM files, go right ahead. Of course I do not share my full HTA with everyone, just the generic base copy, so that's totally up to you.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#38
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,766 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

I made an update to the current version to v7.3. The Code has not been changed, I just changed the readme file. The SkyDrive link should still work without a problem.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#39
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,766 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

Moved some content from post 1 to post 2. Changed the intro to show as more of a project rather than just a support thread.

Added "development opportunities" which is basically just a list of things that have been requested, or that I wanted to change as well. A little note about some of these...

The App and Custom OS installer is something present in my version of the HTA, but is removed from the public version. Currently, my HTA has buttons (the mount/capture/append buttons) changed to install applications and deploy custom images such as Win7+WinRE, Server 2008 + WinRE, custom partition values with XP. These menus are hand-coded and I've recently come into a situation where I cannot easily maintain these menus anymore aka the actual server is no longer at my location. So I wanted to come up with a program that would look on the file share for a file, and that file would tell those menus what apps or images are available, and populate the menus appropriately.

This idea also ties in with the "local os detection", custom partition support/browse for diskpart script items as well.

If you have any other ideas or want to help out, feel free to post here!
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#40
dwburkett

dwburkett
  • Member
  • 1 posts
  • OS:XP Pro x86
  • Country: Country Flag
I keep getting an error when adding my boot.wim to my wds. It keeps telling me that the file does not contain a valid boot image. I have followed the examples to a tee and even modified where appropriate for an x86 environment. All the configuration was done using waik. Any input would be greatly appreciated.
Edit:FIXED, my virtualization waas being screwy, however, do i want to add the winpe.wim or the boot.wim in the iso\sources directory?
It wont let me delete this post,but it's solved..still having resolution/button functionality issues though...

Edited by dwburkett, 08 February 2011 - 12:49 PM.


#41
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,766 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

The official instructions have you copy the winpe.wim into sources\boot.wim. So you have the "original" and untouched winpe.wim, and your production boot.wim. You could just skip that whole step and use the winpe.wim. It doesn't need to be called boot.wim either, you could call it bananas.wim and WDS isn't going to care.

Basically, if you did the xcopy winpe.wim sources\boot.wim, AND you mounted and modified the boot.wim, then you need to add that one.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#42
SoultakerPT

SoultakerPT

    Junior

  • Member
  • Pip
  • 87 posts
Hi there and greetings from Portugal!

First of all, I would like to thank to everyone that made this fantastic solution possible!
It really helped me a lot!

Now...the 2 issues I still have!

#1
After applying the image to a machine I always get 2 boot options (both named Windows 7), one works and continues the machine installation and the other do nothing (crashes to the usual boot manager menu).


#2
It's there anyway with this processo to add an answer file when applying the image?



Best Regards,
Soultaker
[Geeking Around Technological World] http://front-slash.blogspot.com

#43
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,766 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

1. The only time I have seen two entries show up, its because there was an OS on the driver before and an image was applied overtop. For example, first boot after WinRE is run will do this, but the other option goes away after sysprep has run the first time. Are you doing multiple partition installs? I have noticed that the multiple partition option does not always assign the appropriate drive letters.

2. Unfortunately no. You can add an answer file directly into the image. All my images that use answer files have them in the image already.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#44
rolltoheaven

rolltoheaven
  • Member
  • 1 posts
  • OS:Windows 7 x64
  • Country: Country Flag
HI there, thank you very much for this thread. But I am having some problem, I created the Boot.wim as specified. Now when I put my USB drive, it loads from the uSB drive and connect to the network successfully as well. But after that in IngegX hta there is nothing in selct file. I do have a dozon .wim file in server.
Also what I am trying to do is, I have wim files in server. I want to stick my USB driver in whatever computer I want and apply the wim file to that computer. So how do I do that any comment will be appreciated.


Thank you very much

#45
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,766 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

If you are getting the browse box after the PE boots, its because there is something up with your NIC. Either you can't get an IP or the NIC drivers are not installed.

Open a CMD and verify you have an IP and can access the mapped network drive. Otherwise you'll need to use DISM to put your NIC drivers in the boot.wim.

Also, in the imagex.hta, on line 25 is a "myFilePath" which is what you want to match against the map driver command in your startnet.cmd. For example, mine says:

myFilePath = "Z:\"						                            'The folder that contains the *.wim files add "\" to the end of the path.

Edited by Tripredacus, 11 July 2011 - 02:39 PM.

MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#46
6Maverick6

6Maverick6
  • Member
  • 1 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Hey Guys
Noob to all this and after reading the first page this looks like it only works back to a network Share.

Before i start getting stuck write into this can it be used to Capture WIMS from the Computer to the USB Drive.
Sorry about the stupid question :)

#47
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,766 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

It doesn't have to be a network share to use this. As a standalone, you just need to change the drive letter (see the post before yours) to point where the images are located. Even if you don't do this, you can use the Browse button to select the correct drive.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#48
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,766 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

Found a bug with the custom partition values option. HOWEVER this will only work if you put a value in the first box, but leave the second box zero. In this section:

'****************************************************************************
'Two values
'****************************************************************************

Suspect line

ObjFile.WriteLine "    ElseIf form.Custom2.Value = 0 Then"

Should be

ObjFile.WriteLine "    ElseIf form.Custom2.Value > 0 Then"

Here is a Beta Beta version - NOTE: Does not work in WinPE4 RTM x64
For Server 2008 R2 deployments and support for GPT. You cannot PXE boot to this and expect it to work. It can only work if your WinPE boots from a UEFI enabled CD/DVD or USB key. You can still use the non-GPT options with PXE, but if you choose the GPT Disk option when you PXE boot, you will have a 2TB C: drive.

I have a separate boot.wim that uses this "Server" class files. Here are those instructions.

1. Need to change the x:\windows\system32\misc\diskpart.txt so that it will do a default deploy of Server correctly.

sel disk 0
clean
creat part pri size=100
sel part 1
active
format fs=ntfs label="System Reserved" quick
create part pri
sel part 2
format fs=ntfs label="LocalDisk" quick
assign letter=c
exit

2. I have modified the HTA to run a program called GPT check, which checks for the presense of the MSR partition. In my test boot.wim, I have the EFI components saved into the ramdisk, however the appropriate method would be to have a WIM to deploy the appropriate EFI files. And that will get tricky as well because any UEFI deployment is HDD size dependent. I have not yet been able to test same size drives among different manufacturers! GPTCheck.exe (autoit) src here:

Spoiler


This program is called during the reboot MsgBox, which means if you elect to do the other option, it won't run the prorgram. So if you choose to do a shutdown, next boot will result in an error.

3. The second option for the Diskpart.hta "Make one primary partition" now says "use GPT Disk".
4. Changed it so the custom partition values will work and create the System Reserved Partition. This only works with having 0 in the second box. ALSO this does not allow you to do a custom partition on a GPT disk either.

You can test it out. Hopefully I modified the file appropriately.

Attached Files


Edited by Tripredacus, 25 April 2013 - 02:31 PM.

MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#49
dcistech

dcistech
  • Member
  • 8 posts
  • OS:none specified
  • Country: Country Flag
This seems as good a place as any to post this question, but if I'm in the wrong place, let me know.

I'm working on making a WIN7PE_SE script for v7.3 of this HTA. That tends to mean its a bit of a non-standard install, but even with that, I'm getting some strange behavior.

Background:
I'm currently working with the 32bit version of the HTA/COM. I'm using the package installer script to install the hta, mdac, scripting and wmi packages, and that seems to be working just fine. I currently have the script install everything to the program files folder (ease of shortcuts etc) and have the GImageX_COM.dll set to register on boot. I had some trouble getting that to work, but it's working now. The only modification I've made to the HTA itself was to add the GImageX icon attribute.

The Issue(s):
When I go to apply an image I run into two issues: first, it tells me I need to have a cmd window open. This is strange to me, as the HTA does not appear to use the cmd window, it just wants it open. I looked at the HTA itself to see if I could figure out the logic behind the cmd count stuff, but it's a bit over my head. Any info as to why it does this, and assuming it is essential, how I might be able to automate it doing this (with the window hidden), would be useful.

The second issue, is that even when I make sure to have a cmd window open before running the HTA, I make it all the way to the diskpart settings, select an option (one partition), select the c: drive, and the entire HTA becomes unresponsive.

If anyone has any ideas relating to why this might be happening, and how I can resolve it, I would love to hear them. My organization has been using an older PE 2.0 version of the HTA for a while now to help ease imaging computers for techs with little background/time, but I'd like to put together a more robust version with a number of other utilities (hence the WIN7PE_SE set up). Unfortunately, all of that is for nothing if I can't get this HTA to work.

EDIT: I should note that the HTA is running from RAM, loaded off a flash drive. I don't think that's related, but ya.

Edited by dcistech, 10 May 2012 - 08:41 AM.


#50
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,766 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

I haven't used Win7PE_SE with this at all, so I can't comment on it, including whatever behaviours you are encountering. I have confirmed (in testing) that it does work in WinPE 3.1 (Win7 SP1 WAIK Supplemental) x64.

For the CMD issue, the HTA script checks for CMD presense. That is, if you have an additional CMD open (besides the one startnet.cmd uses) it may not run properly until it is closed. I have not tested what this script behaviour does if the HTA is loaded via winpeshl.ini or any other method. I also do not know what the purpose of the CMD checker is for, since it was a function added by the original programmer who has abandoned this project.

The second issue, is that even when I make sure to have a cmd window open before running the HTA, I make it all the way to the diskpart settings, select an option (one partition), select the c: drive, and the entire HTA becomes unresponsive.


There is supposed to be a progress bar that appears on the screen. Since that ability to have a working progress bar did not present itself at the time this HTA was created (Vista) its functionality has not been updated for the newer versions of Imagex.exe or DISM.exe imaging. Even so, many people have trouble being able to accurately read the progress value.

Typically, what appears in its place is a gray rectangle in the middle of the screen. However, on some video cards, no box may appear after selecting the drive letter to install to. In these cases, you need to wait until the Confirmation box comes up saying it is done.

Have you tried a manual build of this HTA to make sure it is working?
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN