Jump to content

How to select WIM image from select box in hta/vbscript?


Recommended Posts

Posted

Hi fellow users!

So far I have successfully made WinPE boot and initialize the system with mapping the network share where the files for deployment are hold. I am stuck at getting a select box in my hta script to display my wim files from the folder "Images".

When the deployer has entered a computer name, selected the wim file to deploy on the hard disk and chosen a disk configuration (diskpart) he will hit the "Install" button and imagex will begin the process of applying the image to the hard disk.

But first thing first, how do i get my select box to be able to see and choose wim files from a folder.

my code:

HTML

<select name="osname" class="selectbox"></select>

VBScript

sub getWims

'THE CODE I NEED to get working'

end sub

Thanks in advance!


Posted

Well, before spending to much time writing your own script. Try download the free MDT 2012 Update 1 deployment solution from Microsoft. It's a readymade deployment solution containing a HTA wizard that runs in WinPE, that displays the images on the deployment server, and allow you to select computer name, and allow you to select disk configurations (via task sequence selection).

/ Johan

Posted (edited)

But if you must code your own, I wrote a powershell snippet last year to choose .wim images on the fly, you might be able to convert to vbs or hta.

http://www.msfn.org/board/topic/150275-add-right-click-wim-windows-7-or-windows-881/page-3#entry1011771

http://www.msfn.org/board/topic/150275-add-right-click-wim-windows-7-or-windows-881/page-3#entry1012585

http://www.msfn.org/board/topic/150275-add-right-click-wim-windows-7-or-windows-881/page-3#entry1012976

Basically you run a "dism /get-wiminfo /WimFile:\\somewhere\install.wim" to generate a list of images inside your wim (w/index #s), then you kludge them into your VBScript input box for users to pick from. The 3rd link is very similar to what maxXPsoft is using in his .wim Shell Ext. If DISM doesn't like the UNC, map a drive letter.

Edited by MrJinje
Posted

Also if you want to code you own using VBScript, take a look at the HTA in my sig. The original author (Geezery) had written code to do probably what you are looking for.

  • 3 weeks later...
Posted

I ended up writing an AutoIt script that allows a tech to select a WIM file from a standard file select dialogue box.

# File Open Dialog Box
FileOpenDialog ( "Select WIM file", "", "WIM(*.WIM)")

I forget which one it was, but I think getting a file select dialogue box to work in VB/HTA was next to impossible....or at least it was messy. I moved to AutoIt - a bit of a learning curve, but it was worth it.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...