Jump to content

WinPE 2.0 GimageX COM based HTA


Recommended Posts

Hi again, Geezery.

Well after working with several different plans of actions to get the current disk/volume status, so when running the imagex.hta, we know immediately what drives are where (e.g. if plugging in a removable drive, you will see its label and what lettter is assigned.)

I've come up with this working example.

Basically we modify the imagex.hta so the default wim location is not hard coded. it should pop up a window asking for the location when the imagex.hta has started. This may mean you need to move the imagex /info within the hta to run after this is entered.

Basically what we can do, is set the imagex.hta to run the command I have placed in diskpart.cmd. this will output the volume list to a file called. disklist.txt in the x:\windows\system32 directory.

Then in the actual html within the hta. we can add this iframe to display the formatted disklist.txt above the current buttons. (see Concept image)

I have built this basic example for you, As the HTA is your baby I will let you integrate it. I integrated it on my copy with a static disklist.txt and not actually re-running the diskpart list volume in the hta and it displays nicely and makes capturing alot easier when faced with multiple partitions/disks.

Hope this helps, worked on it for ages trying to get a working model.

Also I have asked my mate to look at making the dynamic diskpart hta for the applying side of things. He said it will take a week or two. But he'll send me something as soon as possible.


Link to comment
Share on other sites

Here is a preview of next version:


I still have to make that browse for folder function. I havent't found any working methods from vbscript, so I think I have to use something else:)

Link to comment
Share on other sites

Ok, added a new version.

I need some testers to find bugs:)

I made an autoit script for the browse function, since I couldn't find any working vbscript methods. There is a file called browse.exe.

Here is the code for it:

$file = "X:\Windows\System32\browse.txt"
if FileExists ($file) then
$message ="Select location of *.wim files"
$Open = FileOpenDialog($message,"C:" & "\", "Windows Imaging Files (*.wim)", 1 + 2 )
FileWriteLine($file, $Open)

The only purpose for the browse.exe is to get the browse for file dialog open in winpe v2. I made some testing and it worked for me.

There is also a new Hard Disk Info function, but I had no time for testing it. So there might be something to improve.

I had to put the zip to my personal ftp, since the limit uploading here is 200kb and the zip is 207kb:)

Edited by geezery
Link to comment
Share on other sites

Was able to unzip with winrar but not sure if there are any missing files. Here is what I got in the zip:

append.gif - 2k

capture.gif - 2k

cmd.gif - 2k

drvmap.vbs - 1k

exit.gif - 2k

htastyle.css - 2k

imagex24.hta - 16k

reload.gif - 2k

Trying it out now. I had added a button for Rdeploy since we use that too to the toolbar so don't want to just replace what I have. I'll let you know how it works.

Link to comment
Share on other sites

Found a bug, I will put new files in a moment.

New package I quick tested it also and it works. The browse.exe was also corrupted. Use the new css file, or edit your current one, since there is some new styles for disk information.

Edited by geezery
Link to comment
Share on other sites

If you can find another way to write stdout please tell me.

Set oExec = objShell.Exec("imagex.exe /info " + strFile)
Do While Not oExec.StdOut.AtEndOfStream
sReadLine = oExec.StdOut.ReadLine

Link to comment
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.
  • Create New...