Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


geezery

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.

disklist.zip

Share this post


Link to post
Share on other sites

Here is a preview of next version:

post-105112-1181290040_thumb.jpg

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:)

Share this post


Link to post
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
FileDelete($file)
EndIf
$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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Let me know if this works.

Having trouble witht he script. Keeps coming up with Type Mismatch for VolInfo. Tried DIM'ing it in the Globals but no luck.

browse.rar

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Anyway to make it execute imagex /info command hidden? Don't like to see the black dos box popup when selecting your wim and getting the list of images.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Well if you pipe it to a text file you won't see any windows flashing and then just read the text file. Thats one way.

Share this post


Link to post
Share on other sites

That's true. Actually in earlier versions I did it that way, but I was not sure about writing to ram disk.

Edited by geezery

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...