Jump to content

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


doestergaard

Recommended Posts

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!

Link to comment
Share on other sites


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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 3 weeks later...

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.

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...