Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

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

- - - - -

  • Please log in to reply
4 replies to this topic

#1
doestergaard

doestergaard

    Newbie

  • Member
  • 12 posts
  • Joined 15-August 13
  • OS:none specified
  • Country: Country Flag

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! 




How to remove advertisement from MSFN

#2
arwidmark

arwidmark

    Member

  • Member
  • PipPip
  • 105 posts
  • Joined 22-December 05
  • OS:none specified
  • Country: Country Flag

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


Regards

Johan Arwidmark
Microsoft MVP - Setup / Deployment

#3
MrJinje

MrJinje

    Toolâ„¢ Developer

  • Developer
  • 1,055 posts
  • Joined 14-October 09
  • OS:Server 2012R2
  • Country: Country Flag

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/...-3#entry1011771

 

http://www.msfn.org/...-3#entry1012585

 

http://www.msfn.org/...-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, 10 September 2013 - 09:49 PM.


#4
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,923 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

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.


MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#5
secotton

secotton
  • Member
  • 8 posts
  • Joined 29-November 03

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.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users