Tripredacus Posted April 22, 2013 Author Posted April 22, 2013 (edited) 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 May 31, 2013 by Tripredacus
MadFly1 Posted May 31, 2013 Posted May 31, 2013 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?
Tripredacus Posted May 31, 2013 Author Posted May 31, 2013 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.
MadFly1 Posted June 3, 2013 Posted June 3, 2013 (edited) 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 June 3, 2013 by MadFly1
MadFly1 Posted June 3, 2013 Posted June 3, 2013 nothing.... 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"?
Tripredacus Posted June 8, 2013 Author Posted June 8, 2013 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.
Tripredacus Posted June 10, 2013 Author Posted June 10, 2013 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 NextobjShell.Popup Percent, 1, "Title", -1If Percent = 100 Thenprogress.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 SubElseCall ProgressHelper(Percent,TimeRemaining)End IfEnd SubSub ProgressHelper(pr,tr)On Error Resume NextintFMin = (tr MOD 3600) \ 60intFSec = (tr MOD 3600) MOD 60progress.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 Thenwindow.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>"ElseExit SubEnd IfEnd SubAs 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/
Tripredacus Posted May 13, 2015 Author Posted May 13, 2015 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.
Tripredacus Posted June 10, 2015 Author Posted June 10, 2015 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. 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.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now