Tripredacus

ImageX HTA with Win PE 3.0/4.0 x64/x86

69 posts in this topic

If you try using this on WinPE4 x64 and do a UEFI boot via CD/DVD or PXE (or whatever) you'll find that everything is thrown off regarding pictures and text size. This is because WinPE4 can detect the native resolution of the display and will use GOP mode to automatically set the resolution. I have just tested a method of using ZOOM in javascript in a test HTA that you can use in this case.

Add the following Javascript code to a script element. I placed mine after the Script end tag for the VBScript code.

<script TYPE="text/javascript">
function pageLoadFunctions()
{
document.body.style.zoom = screen.height / 768;
}
</SCRIPT>

Then I change the BODY tag:

<BODY ONLOAD="pageLoadFunctions()">

It isn't 100% perfect, the right side of the HTA's background image is cut off but overall it is better.

Edit: This works fine on a 4:3 display. It leaves a large white space on the right side if using a 16:9 display and 1024x768. This is caused by the wallpaper background image.

Edited by Tripredacus
0

Share this post


Link to post
Share on other sites

Hi, Thanks to everyone who contributed to this project... I only VERY recently started playing around with winPE, and came across this forum.

Currently like the v7.3 the most, and was wondering if there was a way that I can use both 32bit and 64bit PE HTA at the same time?

I assume the reason they are in separate folders, is because you have to run either one of them... is there perhaps a way that i can put both on a flash drive, which will be my winPE, and then either run 32bit PE or 64bit...

I also assume that the 32bit PE is to deploy and capture 32bit OS, and 64bit PE is to deploy and capture 64bit OS.

Would be nice to have one HTA which can deploy/capture either 32bit or 64bit, or do i completely misunderstand the whole idea behind this project?

0

Share this post


Link to post
Share on other sites

64bit WinPE can do both, its the only one I actually use.

The only problems with 64bit WinPE is that the client needs a 64bit CPU to boot. Also requires nearly 1GB RAM (its less than that but I don't know how to test it) 99% of the time and 2GB on some boards with RAID enabled.

In other news, I've been working on trying to get the HTA to deploy via UEFI but it isn't working out yet. As it stands, this HTA can't deploy to UEFI and it can't deploy Windows 8. :(

0

Share this post


Link to post
Share on other sites

excellent.

I have configured for myself a virtual environment (hyper-V) where i can play with this hta thing.

Works great so far, but for some reason when i try to apply the captured image to a new virtual pc, it complains that the bootmgr is missing.

Is there a way that I can capture the boot partition as well, or should i create it manually? Or could I somehow implement a button or two in the diskpart options?

Once I get this to actually work, i'll start playing around with adding drivers to the wim and a few other things i would like to try. but for now the capture and apply is more crucial.

Edited by MadFly1
0

Share this post


Link to post
Share on other sites

nothing.... :realmad:

the progress bar not run...

i have the same grey rectangle...

i make all the steps , gimagex x64 , startnet.cmd , and all packages..mhta...etc...

nothing :(

i don't understand where is MY error...

The current code in this is still the same as v7.1 except for the code changes mentioned in this thread. So the progress bar code is still incorrect, and as such, does not work for anyone. So its not your error, no one sees the progress bar. It is good enough to see the square, on some video cards/motherboards, no rectangle appears at all! Anyways, you will know when it is done because it shows you a prompt after applying the image.

How would one go about replacing that whole progress sub with an animated picture "loading.gif"?

0

Share this post


Link to post
Share on other sites

Uggg apparently there was a database rollback and my reply to this was lost. I will post again on Monday and see if I can reconstruct that reply. :(

0

Share this post


Link to post
Share on other sites

To the best of my knowledge, the gray rectangle is from either one of these subs, right at the very end of the VBScript.

Sub objWIM_Progress(Percent,TimeRemaining)
On Error Resume Next
objShell.Popup Percent, 1, "Title", -1
If Percent = 100 Then
progress.innerHTML = "<table border='0'><tr><td>Percents completed: </td><td>100 % </tr><tr><td>Time remaining: </td><td>0 min 0 sec</td></tr></table>"
Exit Sub
Else
Call ProgressHelper(Percent,TimeRemaining)
End If

End Sub

Sub ProgressHelper(pr,tr)
On Error Resume Next
intFMin = (tr MOD 3600) \ 60
intFSec = (tr MOD 3600) MOD 60
progress.style.visibility = "visible"
progress.innerHTML = "<table border='0'><tr><td>Percents completed: </td><td>" & pr & "%" & "</td></tr><tr><td>Time remaining: </td><td>" & intFMin & " min " & intFSec & " sec</td></tr></table>"
If pr = 100 Then
window.clearInterval(iTimerID)
progress.innerHTML = "<table border='0'><tr><td>Percents completed: </td><td>100 % </tr><tr><td>Time remaining: </td><td>0 min 0 sec</td></tr></table>"
Else
Exit Sub
End If

End Sub

As a way to replace that, I can think maybe change it to show a pop-up HTA similar to the Diskpart/format select screen, but instead the HTA would be fairly simple and have a Style Body object that has this:

background-image:url('resources\imagex.gif')

This is only an example. If you have any questions relating to VBScript, ask them here:

http://www.msfn.org/board/forum/66-programming-c-delphi-vbvbs-cmdbatch-etc/

0

Share this post


Link to post
Share on other sites

NOTE: You cannot use the basic functions of this HTA to work with Windows 8 or Server 2012 images. Imagex.exe does not do the job unforuntately. This still works with previous OSes the same. You'll have to manually use DISM to capture/deploy Windows 8 images!

Oddly enough... I am able to deploy and boot an image of Windows 10 build 10074... just wanted to point it out.

0

Share this post


Link to post
Share on other sites

I wanted to show how this looks on UEFI boot. This specifically shows how MSHTA does not scale the content, and how the wallpaper looks... it is a small tablet that is firmware locked to boot x86 in UEFI only (no legacy, no x64) so I made the best by putting the HTA into the WinPE 10 x86. Coin is there for scale, US Quarter.

 

20150610_120927_zpsirxjobrm.jpg

 

In normal operation, the wallpaper will scale whether using 4:3 or 16:9 in legacy mode, however 16:9 displays booted in UEFI mode will always have this white space to the right.

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.