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
chiners_68
Cheers Geezery,
Ive just noticed from running imageX from the cmd line it verifys. microsft have obviously built that in. Im looking for away of turning it off but I dont think that is going to be possible.

What sort of times do others get copying & image to a network share..? a 40GB drive with 14GB of used space took 2 hours to create an image on my network. If I use my old drive image I can do it in 10 mins.

Ill try the cmd line for setres when this image im doing has finished.
chiners_68
SETRES worked Ok from the cmd line.

Ive now updated the hta file & I got an error

line 463
char 1
type mismatch 'do task'

this is when the GUI loads & I get the same erro when I now click on your cmd window button.

i think ill reset the setres to the supress error & run set res from startnet.cmd
chiners_68
setting
setres 1024 768

in the startnet.cmd just before your GUI loads worked.

regards
chiners_68
Right, Im creating XP images OK but when I restore one it wont boot into Xp. i think its possibly due to the 15GB c partition & the orginal partition size is 60GB.

how can I set diskpart.txt so I only get 1 partition & the whole size of the HDD. i dont want to diskpart to a specific size as various models of machine have different size HDD's. I want it always to do a single partition the whole size of the drive.
geezery
Sample diskpart.txt file for only one partition

CODE
select disk 0
clean
create partition primary
select partition 1
assign letter=c
format fs=ntfs label="system" quick
active
exit


If you got problems booting to new applied system try to manually put the first partition active
type diskpart from the command line:

select disk 0
select partition 1
active

If you had vista bootsector before. you must use the bootsect.com utility witch comes along with WAIK.

bootsect /nt52 c:
p4ntb0y
@Geezery

Why add the sel partiton 1 then do the assign?

sel disk 0
(sets focus to disk 0)
clean
create part pri (This is part 1)
active
assign letter = blah
format fs=ntfs label="System" quick

or do the format out of diskpart

I know there are allways more than one way to do things.
chiners_68
so this will make a partition the whole disk size no matter how big the disk is?

CODE
select disk 0
clean
create partition primary
select partition 1
assign letter=c
format fs=ntfs label="system" quick
active
exit


The dell units im installing had xp on previous. Im just repartioning & reimaging.
powaking
Is it "safe" to do a quick format or is it best to do a full format? This part seems to take a LONG time and anything to speed it up would help. Is there another tool that would do a quicker full format?
FredBeagle
This is from M$

"When you choose to run a regular format on a volume, files are removed from the volume that you are formatting and the hard disk is scanned for bad sectors. The scan for bad sectors is responsible for the majority of the time that it takes to format a volume.

If you choose the Quick format option, format removes files from the partition, but does not scan the disk for bad sectors. Only use this option if your hard disk has been previously formatted and you are sure that your hard disk is not damaged.
"
chiners_68
Geezery,
is there any chance of you adding some options for partitioning when installing an image. A few simple selection would surfice.

1. Selection for 1 partition or 2
2a.Tickbox for full drive partition if only one partition slected.
2b.A box next to this if you want to specify partition size for the 1 partition.

3. If two partition are slected you have two boxes for partition sizes with a tick box next to partition 2 to just fill the rest of the drive after size of partition 1 is set.

If I could write code i would do it but i havent got a clue.


regards

chiners_68
chiners_68
any chance of adding a delete button so you can remove a wim file or an image contained in the wim fie..?
solutionone
the simple partitioning options has my vote.

I would like the options....

1. Leave disk as is (no changes at all) just just imagex
2. Wipe the drive, create one large partition and format (quick)
3. Wipe the drive, create one large partition and format (regular)
4. Custom (opens diskpart.txt with an example of 2 partitions)

also I was wondering if you could add an option to choose the drive letter to apply the image to when clicking install.

keep up the excellent work geezery.
geezery
I'm currently coding some new features to imagex gui, but I won't release the next version until I have tested it properly. Maybe I could give it to someone who likes to test new features and report bugs.

Here is a list of upcoming updates:

Still developing:

-New diskpartition options when applying image

Click to view attachment

-Mounting & Unmounting of images in Windows XP and Windows Vista

Ready:

-Ability to choose drive letter where to apply image
-Support for Windows XP and Vista
-Made some huge bug fixes to gui
-Possibility to add a company logo to gui easily
MAVERICKS CHOICE
@ geezery look forward to it.
t00fan
QUOTE (geezery @ Aug 22 2007, 05:16 AM) *
I'm currently coding some new features to imagex gui, but I won't release the next version until I have tested it properly. Maybe I could give it to someone who likes to test new features and report bugs.

Here is a list of upcoming updates:

Still developing:

-New diskpartition options when applying image

Click to view attachment

-Mounting & Unmounting of images in Windows XP and Windows Vista

Ready:

-Ability to choose driver letter where to apply image
-Support for Windows XP and Vista
-Made some huge bug fixes to gui
-Possibility to add a company logo to gui easily


I would be more than happy to test it out for ya. Let me know.

dharmesh (dot) topiwala (at) gmail.com
solutionone
good to hear news on this great project,

The new features sound awesome especially the new partitioning system, if you do need an early adopter to test, I have several test machines I can play with.

the only other features that would be nice having are the following

1. Fault Detection e.g. Recently I started a capture of a working system as a backup before a rebuild, the chkdsk completed successfully and the imagex started processing directories/files and I went off to lunch, happy and content, when I got back it was up to the "click OK to reboot....). which I did and then rebuilt the PC, what I forgot to do, which I normally make a point of, is checking to make sure the WIM is actually there. Unfortunately it wasn't.

now I know this HTA just runs the imagex command so if an error message popups when unattended it is missed. is there a way for you to modify the hta to check that the wim file (that was specified when the capture is started, is actually at the specified location. (e.g. performing a dir/s filename.wim or something). this feature would be invaluable.


2. excludes system, e.g. picking a text file to set the files/folder to be excluded. or failing that, an easier way to set custom excludes.

On a side note, Does anyone know if it is faster to boot windows pe from a usb key (USB 2.0) or a CD-ROM?
geezery
QUOTE
/config configuration_file.ini
The name and location of the configuration file. You can rename this file, as necessary.

Note:
If you rename your Configuration_list.ini file to Wimscript.ini and store it in your ImageX directory (where the ImageX.exe file is located), it will automatically run when you run the /capture option, without requiring you to use the /config option.


I tooked that one from the MS ImageX Command-Line options.

There is now three volunteers who likes to test the new version. I will put it in your mail next week. I think that, there is about 200 lines of new code, so there must be something to fix.
solutionone
ah, I missed the wimscript.ini post.. must be blind.

I edited my last post with my other request whiile you were posting the above reply, hopefully you didn't miss my almost begging request for some basic fault checking when capturing.

regards
geezery
Can you explain me a bit the nr. 1. request. So you captured c: drive to new .wim image and eventually you didn't have the wim file specified?

I don't catch the problem??

I think the USB boot is a lot quicker if the target computer supports high speed usb on the boot. But if it uses USB 1.1 then the CD-boot method is a lot quicker.
solutionone
Thanks for the USB advice,

The basic issue, is that at the moment when running a capture, unless you sit there and watch the progress to make sure no error messages pop up/imagex crashing. Once the imagex command is complete (regardless of success) the HTA pops up a message saying the image is complete, and to press okay to reboot (or something like that, I can't remember the exact wording)

the problem being sometimes the image wasn't successfull and there is no indication anything went wrong.

what I would like if possible, is for the HTA to remember the specified wim path/filename and check to make sure the image is actually there after the imagex capture command has been processed,

so instead of saying the current "complete, press okay to reboot....(or whatever it says exactly at the moment)" it should say: image PATH\FILENAME.wim successfully captured and verified (just a simple check to see if this file is actually where it should be and exists), press "OK" to reboot or "CONTINUE" to return to Imagex HTA.

this last little bit of simple fault checking would be a huge help for me, normally I make a habbit of quiting the HTA or openning a command prompt and checking for the file manually after a capture, but the one time I forgot as I was in a hurry, the capture had failed and I didn't notice until I had formatted the drive, installed Windows and then went to recover some data. (bugger)
geezery
Ok, I can add that to the script, will be in the next version.
solutionone
You should receive some sort of Microsoft Nobel Prize for all your hard work,

I just came back from TechEd 2007 NZ a week ago, and I was telling one of the MS guys about this project and he was really buzzing.
I know there is the other imagex gui out there, but after looking into it, while it exposes all the imagex functionality, It doesn't stream it all into the ease of use that this solution provides.
powaking
QUOTE (geezery @ Aug 25 2007, 02:55 AM) *
I think the USB boot is a lot quicker if the target computer supports high speed usb on the boot. But if it uses USB 1.1 then the CD-boot method is a lot quicker.


I've managed to get VistaPE booted via PXE using TFTP32 app. Much quicker than CD and no need to carry one around. Really comes down to if the nic supports pxe booting and it can be tricky to setup too. I haven't tried with just WinPE but don't see it being any different.
chiners_68
Im willing to test the new developments.
geezery
I have the diskpart Function now almost ready, there is still some fine tuning to make. The diskpart script looks really nice, since I tested it tomorrow. It was very hard to implement, since I had to rewrite my own dialog box for it.

It generates the diskpart script file automaticly from the input that user gives. There is some problems with multiple partitions since if you are running the script from the USB-drive or CD-Rom drive the script needs to change those volume drive letters to be able to make more than two partitions.

I still have to make the Mount / Unmount and some pre-testing also.

I think I'm going to add option to also allow Remote Desktop connections to the WinPe and so on..
geezery
I posted the new v0.50 beta to testgroup members.

There is plenty of bugs, because the diskpart function is very hard to write for universal use, since everyone has different setups.

If you can post the bugs here, so I can fix them as soon as possible, so I can release the new version for public use.

Known Bugs:

-Leave current file system alone (The apply won't start after selecting that option)
-If you are making four partitions from custom partition selection it won't format the last partition. (I don't have a solution for that, maybe I have to stay on three partitions. The bugs comes because there will be conflict between drive letters, if I assign drive letter to the already existing drive letter.) If there is a diskpart gurus around, give me a hint how to resolve this issue.
powaking
QUOTE (geezery @ Aug 28 2007, 09:26 AM) *
I think I'm going to add option to also allow Remote Desktop connections to the WinPe and so on..


I'll be VERY interested in this!!!
geezery
Since I didn't got any replys from my "beta"- testers I putted the new v.0.70 open for public. I know there is some problems with the diskpart function, but if someone likes to test that new version it would be great. At the moment I only got the Custom diskpart settings to work correctly. They all work, but there is some problems when using the command line software imagex.exe and diskpart.exe together.

Always remember to make a partition size bigger or same size than in the image. I think I can write a error check for this, but I want to get that **** diskpart function fully working.

-Added diskparting options (there is some major bugs still to fix)
-Map Network drives dialog
-Mount / Unmount images (remember to always unmount the images also:)
-Possibility to add your own logo
-Shutdown button / function
-I also made some error checking (that needs to be improved, I need your opinions / feedback)
-Made a check to the capture function. Checks that the captured file exists after capture.

I added almost 500 lines code.

Please post the feedback here or directly to my mail address, which you can find from the first post.

You can find the download links also from the first post.
solutionone
Hi Geezery, sorry it has been so long since I last posted, I've been flat out at work.

I have tested beta 0.070 and picked up the following bugs/suggestions.

1. Map network drive.

once clicking the button from the main HTA, I receive the following IE Script Error:

Line 25, Char 1, Error: Object required: 'ObjFso', Code 0, URL: file://X:/Windows/System32/netmap.hta

carrying on from there, I get several other script errors, but I think they're all related to the first message.

2. Logical Disk Information.

This is more of a suggestion, I think it would be beneficial to have column titles on the disk information (e.g. Drive Letter, Label, Free Space, Total Space)

3. Default mount path

it would be good if the default path to the mount point was set as the image location when the HTA is started.

4. Completed capture.

it would be good that after the message telling you that the capture is a success that the next box that currently says "do you wish to reboot" - "ok" or "cancel" be changed to the OK button saying reboot, and the cancel button saying return to the hta to continue imaging or something.

5. Mount Image.

This is currently not working, it just flashes past a dos box. I think the wimfltr.inf actually needs to be installed, this could be done as the hta is being loaded, so people don't need to manually inject the drivers.

hope this helps, I haven't had a chance to test it further.

keep up the excellent work.
geezery
Thank you for your reply.

1. This isn't a big problem
2. I thought those titles would be nice. I can add them.
3. I'm using network drives, so I think I'll stick with that C:\mnt as a default mount point.
4. I Will add that text
5. It worked fine for me. Actually I have never mounted image inside WinPE, since I think that it is impossible. I might be wrong.
`Felix`
Hi all,

I have followed the instructions, however after trying both the stable and the beta versions i am still only getting the imagex.hta file loaded with a white screen and nothing more... Can someone please advise where i am going wrong?

Cheers,
Felix
geezery
Tell me about your configuration how much memory etc.
`Felix`
QUOTE (geezery @ Sep 12 2007, 10:36 PM) *
Tell me about your configuration how much memory etc.


I am testing in VMWare the virtual machine configuration is as follows:

256mb memory
8gb hdd
cd-rom is using winpe_x86.iso
1 processor

I have tested other winpe based installations and shell's like VistaPE, NativePE and they work perfectly... I would prefer to use the simple imagex.hta concept as i can tailor this to meet my requirements.

Look forward to your reply.

Cheers,
Felix

PS have also just tested with with memory set to 1024mb and still the same problem. Please also find below my startnet.cmd configuration.
CODE
wpeinit
net use i: \\zathras\d$ /user:zathras\daz
mshta.exe c:\windows\system32\ImageX.hta
geezery
Try to build your PE image again and install these components.


1.HTML application Support
peimg /install=WinPE-HTA-Package c:\winpe_x86\mount\Windows
2.Microsoft Data Access Component support
peimg /install=WinPE-MDAC-Package c:\winpe_x86\mount\Windows
3.Windows Script Host support
peimg /install=WinPE-Scripting-Package c:\winpe_x86\mount\Windows
4.Microsoft XML (MSXML) parser support
peimg /install=WinPE-XML-Package c:\winpe_x86\mount\Windows
5.WMI (Windows Management Instrumentation)
peimg /install=WinPE-WMI-Package c:\winpe_x86\mount\windows

I think you should use the 0.32 because there is some bugs in the beta version. I'm going to fix those soon, but you can easily update to newest version afterwards. Unzip all those files to the boot.wim \Windows\System32 folder.

Then open notepad and edit the MyFilePath variable in the beginning of the HTA to yours. i:\ or something.

User chiners 68 got this to work only by putting this line to startnet.cmd

CODE
X:\Windows\System32\mshta.exe X:\Windows\System32\imagex.hta


I would also like to hear some more feedback about the new beta version. I can see, that it has been downloaded over 200times, so there must be someone who have tested it.
geezery
Ok, I'm doing the best I can to release a new version today, but I don't have a proper test environment here at home. Can someone download the new beta2 version and test the diskpart function. I need to know all the errors etc., so I can fix them. I also tested the mounting / unmounting and I had some problems with it. But the problems went a way when I manually installed the wimgapi.inf. I need to know how I can install that one inside the script, so everyone can use it. I think if we can get that inf installed inside WinPe the mounting will also work from there.

You can find the download link from the first page.

PLEASE I NEED FEEDBACK URGENTLY TO BE ABLE TO FIX ALL THE PROBLEMS INSIDE THE SCRIPT
solutionone
Hi Geezery, I just finished work for the day so I can't test the new beta right now, but I will download it and test it tomorrow and get back to you.

regards
geezery
The quicker I get feedback the quicker I can fix errors.
`Felix`
QUOTE (geezery @ Sep 13 2007, 12:03 PM) *
Try to build your PE image again and install these components.


1.HTML application Support
peimg /install=WinPE-HTA-Package c:\winpe_x86\mount\Windows
2.Microsoft Data Access Component support
peimg /install=WinPE-MDAC-Package c:\winpe_x86\mount\Windows
3.Windows Script Host support
peimg /install=WinPE-Scripting-Package c:\winpe_x86\mount\Windows
4.Microsoft XML (MSXML) parser support
peimg /install=WinPE-XML-Package c:\winpe_x86\mount\Windows
5.WMI (Windows Management Instrumentation)
peimg /install=WinPE-WMI-Package c:\winpe_x86\mount\windows

I think you should use the 0.32 because there is some bugs in the beta version. I'm going to fix those soon, but you can easily update to newest version afterwards. Unzip all those files to the boot.wim \Windows\System32 folder.

Then open notepad and edit the MyFilePath variable in the beginning of the HTA to yours. i:\ or something.

User chiners 68 got this to work only by putting this line to startnet.cmd

CODE
X:\Windows\System32\mshta.exe X:\Windows\System32\imagex.hta


I would also like to hear some more feedback about the new beta version. I can see, that it has been downloaded over 200times, so there must be someone who have tested it.


Hi there - got it all working now - thanks very much for your help and advise welcome.gif
`Felix`
Have done some testing with beta 2 v70 am getting errors reported:

Line 40
Character 1
error invalid syntax
code 0

also another error

Line 476
Character 1
error invalid syntax
code 0

Also the browse dialogue box is opening and then hiding itself behind the imagex.hta window.

Hope this information helps.
FredBeagle
I have only found one problem
When Mounting an image the second radio button does not work I get "You must select image first!"
geezery
Uploaded new beta 3 version, where is only bug fixes.

'Felix' -> I'll think that those errors are caused by invalid PE image you are using. Do you have WMI component installed properly?

You can find Download link from the first post.

Thank you FredBeagle for the feedback you gave.
FredBeagle
Looking good, The only issue left is the "Object Required: objFso" in line 24 of the netmap.hta

CODE
24 If objFso.FileExists(SysFolder & "\wpeutil.exe") Then
25 Window.ResizeTo 400,170
geezery
Thanks again FredBeagle. I reupped the zip.
`Felix`
QUOTE (geezery @ Sep 16 2007, 04:51 PM) *
Uploaded new beta 3 version, where is only bug fixes.

'Felix' -> I'll think that those errors are caused by invalid PE image you are using. Do you have WMI component installed properly?


Thanks for the help - found the problem - had not installed the WMI component correctly blink.gif Anyway it is working correctly now without errors. Thanks Again... will do some testing in the next 24 hours on the beta 3 release.

Cheers,
Felix
chiners_68
Hi geezery,
Sorry ive got back to you late with testing ive been busy.

ive now setup my PE & ImageX GUI to run from WDS.


1. GUI loads ok but i get a windows (Select location of *.wim files) browse box apear asking to specify path to WIM files.
I never useto get this with 0.32.

i currently map a z: drive in startnet.cmd before the GUI loads.

2. When I press the map network drive button you have the window goes so far in the top left i can see only the right end of the bottom input box. i cannot move this window around to view it all.
geezery
Have you changed the MyFilePath attribute in the HTA to suite your needs. i.e. Z:\images\ and remember to add \ to the end of the path.

I have hard coded that browse files dialog in the script if the MyFilePath doesn't have any *.wim files.

Are you using WinPe or VistaPE?
chiners_68
I knew it would be an easy fix.

When I updated my source with the beta 4 files i forgot to update the MyFilePath in ImageX.hta.

1. Can this my file path be set to z:\ or does it have to have a folder name z:\folder\ with a backslash at the end..?

2. I havent played with it all yet but is there the facility to delete images from within a wim file of multiple images..?

3. Can you clange the font of the Select File:, Select image to Apply: or put a space between the last letter & the :
ive got good eyes but the : looks like its another leter of the word in front that is not complete. the two dots seem to also merge a little into each other.

4. map network window is still going to far into the top left corner & i cannot move it.

5. Anychance of the shutdown having two option shutdown or reboot.? im lazy & cant be arsed to get up & press the power button to switch unit back on.
solutionone
Hi Geezery, sorry its been so long since I last replied,

I have tried out version 0.70 beta 4, I cannot get the Install option working, it starts the diskpart, and then crashes out somewhere after the disk is wiped.

also is the option to choose which disk/partition to install to going to make this version?
qc_metal
QUOTE (geezery @ May 25 2007, 10:41 AM) *
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 newwink.gif - 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 newwink.gif. Essentially, the HTA uses only filesystem objects, and nothing more (no WMI, either).
geezery
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.




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.